style of TMultiGet

style of TMultiGet

Postby Natter » Thu Sep 19, 2024 1:23 pm

Hi

How to change the style of the TMultiGet control window so that it has a title ?
Natter
 
Posts: 1221
Joined: Mon May 14, 2007 9:49 am

Re: style of TMultiGet

Postby karinha » Thu Sep 19, 2024 3:22 pm

I didn't understand. Do you have a small example?

Regards, saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
 
Posts: 7828
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Re: style of TMultiGet

Postby karinha » Thu Sep 19, 2024 3:42 pm

What would you like to do/change?

Code: Select all  Expand view  RUN

// C:\FWH\SAMPLES\TESTMGE2.PRG

#include "Fivewin.ch"
#include "constant.ch"

STATIC oBar

FUNCTION Main()

   LOCAL oDlg
   LOCAL nBottom    := 27.2
   LOCAL nRight     := 89
   LOCAL nWd        := Max( nRight * DLG_CHARPIX_W, 180 )
   LOCAL nHt        := nBottom * DLG_CHARPIX_H
   LOCAL oGet, cVar := "1 - This is a test" + CRLF + "2 - The second line" ;
              + CRLF + "3 - FiveWin Power"

   DEFINE DIALOG oDlg SIZE nWd, nHt PIXEL TRUEPIXEL TiTle "Test MULTI"     ;
      COLORS CLR_BLACK, CLR_WHITE TRANSPARENT

   oDlg:lHelpIcon := .F.

   @ 0, 0 GET oGet VAR cVar OF oDlg MULTILINE SIZE 680, 350 // MEMO

   oDlg:bStart = { || oGet:SetPos( 0 ) }

   ACTIVATE DIALOG oDlg CENTERED

RETURN NIL

// FIN / END
 


Regards, saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
 
Posts: 7828
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Re: style of TMultiGet

Postby Natter » Thu Sep 19, 2024 3:59 pm

When creating a Multijet(), this style is used"
Code: Select all  Expand view  RUN
::nStyle   = nOR( WS_CHILD, WS_VISIBLE, ES_LEFT,;
                     ES_WANTRETURN, ES_MULTILINE,;
                     If( ! lReadOnly, WS_TABSTOP, 0 ),;
                     If( ! lNoVScroll, WS_VSCROLL, 0 ),;
                     If( lDesign, WS_CLIPSIBLINGS, 0 ),;
                     If( lHScroll, WS_HSCROLL, 0 ),;
                     If( lCenter, ES_CENTER, If( lRight, ES_RIGHT, ES_LEFT ) ) )

I need to change the style of an already existing control (exclude WS_CHILD)
Natter
 
Posts: 1221
Joined: Mon May 14, 2007 9:49 am

Re: style of TMultiGet

Postby karinha » Thu Sep 19, 2024 4:55 pm

I think whatever you want, only Master Rao can help. I imagine it would be +- like this:

Code: Select all  Expand view  RUN

// C:\FWH\SAMPLES\TESTMGE2.PRG

#include "Fivewin.ch"
#include "constant.ch"

#define ES_UPPERCASE 8

STATIC oBar

FUNCTION Main()

   LOCAL oDlg
   LOCAL nBottom    := 27.2
   LOCAL nRight     := 89
   LOCAL nWd        := Max( nRight * DLG_CHARPIX_W, 180 )
   LOCAL nHt        := nBottom * DLG_CHARPIX_H
   LOCAL oGet, cVar := "1 - This is a test" + CRLF + "2 - The second line" ;
              + CRLF + "3 - FiveWin Power"

   DEFINE DIALOG oDlg SIZE nWd, nHt PIXEL TRUEPIXEL TiTle "Test MULTI"     ;
      COLORS CLR_BLACK, CLR_WHITE TRANSPARENT

   oDlg:lHelpIcon := .F.

   @ 0, 0 GET oGet VAR cVar OF oDlg MULTILINE SIZE 680, 350 // MEMO

   oDlg:bStart = { || oGet:SetPos( 0 ) }

   IF EMPTY( oGet:hWnd )

      oGet:nStyle := nOR( oGet:nStyle, ES_UPPERCASE )

      oGet:nStyle := nOR( oGet:nStyle, WS_VISIBLE, ES_WANTRETURN, ES_MULTILINE )

   ELSE

      oGet:WinStyle( ES_UPPERCASE, .T. )

   ENDIF

   ACTIVATE DIALOG oDlg CENTERED

RETURN NIL

// FIN / END
 


Regards, saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
 
Posts: 7828
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Re: style of TMultiGet

Postby Natter » Thu Sep 19, 2024 5:03 pm

Thanks, I'll try!
Natter
 
Posts: 1221
Joined: Mon May 14, 2007 9:49 am


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 58 guests