Problem with TTitle class

Problem with TTitle class

Postby Silvio.Falconi » Tue Jan 28, 2020 10:42 am

Image

I with create bar Ttitle intoa Tpages()
this bar width is not until the end of dialog, why ?

DEFINE DIALOG oDlg OF oApp():oWndMain;
SIZE nWidth, nHeight TRANSPARENT ;
TITLE "test TTITLE CLASS"
oDlg:oFont := oApp():oFont
oDlg:nStyle := nOR( DS_MODALFRAME, WS_POPUP, WS_CAPTION, 4 )

oPages := TPages():New(00,0, oDlg:nHeight-50,oDlg:nWidth, oDlg)


DEFINE DIALOG oDlg0 OF oPages STYLE WS_CHILD
@ 0,0 TITLE oTitle0 OF oDlg0 size 1200, 20 NOBORDER SHADOW NOSHADOW ;
GRADIENT { { 1, RGB(151,154,173), CLR_GREEN } }
@ 10, 12 TITLETEXT OF oTitle0 TEXT "AAAAAAAAAAAA " FONT oFontBold COLOR CLR_WHITE


oPages:AddPage( oDlg0 )

ACTIVATE DIALOG oDlg

I put the with also 1200 but the ttitle is allways small
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7075
Joined: Thu Oct 18, 2012 7:17 pm

Re: Problem with TTitle class

Postby ukoenig » Tue Jan 28, 2020 1:13 pm

Silvio ,
try moving the title to dialog INIT:
...
...
...
oPages:AddPage( oDlg0 )

ACTIVATE DIALOG oDlg ;
ON INIT PAINTTITLE(oDlg)

RETURN NIL

//--------------

STATIC FUNCTION PAINTTITLE(oDlg)
LOCAL oTitle0

@ 0,0 TITLE oTitle0 OF oDlg size 1200, 20 NOBORDER SHADOW NOSHADOW ;
GRADIENT { { 1, RGB(151,154,173), CLR_GREEN } }
@ 10, 12 TITLETEXT OF oTitle0 TEXT "AAAAAAAAAAAA " FONT oFontBold COLOR CLR_WHITE

RETURN NIL

Image

regards
Uwe :D
Last edited by ukoenig on Tue Jan 28, 2020 7:22 pm, edited 2 times in total.
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: Problem with TTitle class

Postby Silvio.Falconi » Tue Jan 28, 2020 4:14 pm

yes but the title is on the dialog of Pages control....

and not on oDlg

Main := oDlg

[b]oPages1 :=oDlg0

oPages2:= oDlg1


and not run[/b]


ACTIVATE DIALOG oDlg ;
ON INIT (PAINTTITLE("test",CLR_GREEN,CLR_WHITE,oDlg0,oFontBold) )
RETURN NIL


STATIC FUNCTION PAINTTITLE(cTesto,nColore1,nColore2,oDlg0,oFontBold)
LOCAL oTitle0

@ 0,0 TITLE oTitle0 OF oDlg0 ;
SIZE oDlg0:nWidth-10, 20 NOBORDER SHADOW NOSHADOW ;
GRADIENT { { 1, RGB(151,154,173), nColore1 } }

@ 10, 12 TITLETEXT OF oTitle0 TEXT cTesto FONT oFontBold COLOR nColore2

RETURN NIL
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7075
Joined: Thu Oct 18, 2012 7:17 pm

Re: Problem with TTitle class

Postby Silvio.Falconi » Tue Jan 28, 2020 4:27 pm

Uwe, Resolved
on my oldest message on this forum

Image

not on init another function but this mode

ACTIVATE DIALOG oDlg ;
ON INIT ( DlgCenter(oDlg,oApp():oWndMain),;
oPages:Move( 0, 0, oDlg:nWidth, oDlg:nHeight-80 ))


the problem is now another
on oDlg0 I use a Get control MEMO and it is disabled , only with the mouse or keyboard cursors I can scroll it but the scroll at left of the control not run

local cMessage:=Memoread(cFiletxt)

@ 35, 4 GET oText VAR cMessage OF oDlg;
MEMO READONLY COLOR CLR_BLUE SIZE 300, 100 PIXEL


Image

I tried also with oText:setfocus()

solution please ?
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7075
Joined: Thu Oct 18, 2012 7:17 pm

Re: Problem with TTitle class

Postby ukoenig » Tue Jan 28, 2020 7:23 pm

Silvio,

on oDlg0 I use a Get control MEMO and it is disabled ,
only with the mouse or keyboard cursors I can scroll it
but the scroll at left of the control not run

Your test
local cMessage:=Memoread(cFiletxt)

@ 35, 4 GET oText VAR cMessage OF oDlg; :?: placed inside the main-dialog see my first get
MEMO READONLY COLOR CLR_BLUE SIZE 300, 100 PIXEL

I added some tests
is there the solution included You are looking for ?

Image

regards
Uwe :?:
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: Problem with TTitle class

Postby Silvio.Falconi » Wed Jan 29, 2020 7:11 pm

Tight that was the problem
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7075
Joined: Thu Oct 18, 2012 7:17 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 92 guests