style of TMultiGet

Post Reply
Natter
Posts: 1241
Joined: Mon May 14, 2007 9:49 am

style of TMultiGet

Post by Natter »

Hi

How to change the style of the TMultiGet control window so that it has a title ?
User avatar
karinha
Posts: 7932
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil
Been thanked: 3 times
Contact:

Re: style of TMultiGet

Post by karinha »

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: 7932
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil
Been thanked: 3 times
Contact:

Re: style of TMultiGet

Post by karinha »

What would you like to do/change?

Code: Select all | Expand

// 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
Natter
Posts: 1241
Joined: Mon May 14, 2007 9:49 am

Re: style of TMultiGet

Post by Natter »

When creating a Multijet(), this style is used"

Code: Select all | Expand

::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)
User avatar
karinha
Posts: 7932
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil
Been thanked: 3 times
Contact:

Re: style of TMultiGet

Post by karinha »

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

Code: Select all | Expand

// 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
Natter
Posts: 1241
Joined: Mon May 14, 2007 9:49 am

Re: style of TMultiGet

Post by Natter »

Thanks, I'll try!
Post Reply