Any ideas ?
I tried with oTitle:SetText("New text") without success.
Thanks in advance.
Changing the tTitle text at runtime
- Marco Turco
- Posts: 858
- Joined: Fri Oct 07, 2005 12:00 pm
- Location: London
- Contact:
Re: Changing the tTitle text at runtime
Hi Marco,
Can you try it oTitle:aText[3] := "New Text"
Can you try it oTitle:aText[3] := "New Text"
Regards,
Hakan ONEMLI
Harbour & MSVC 2022 & FWH 23.04
Hakan ONEMLI
Harbour & MSVC 2022 & FWH 23.04
Re: Changing the tTitle text at runtime
Marco,
in File : \samples\testtitl.prg change / add these lines for a Test :
Local oText1
...
...
// Title 1 Horizontal ( top )
@ 015,150 TITLE oTitle1 size 460, 60 of oWnd SHADOW TOPRIGHT
oTitle1:aGrdBack = { { 1, nRGB( 129, 130, 138 ), nRGB( 59, 60, 62 ) } }
oTitle1:nShadowIntensity = 70
@ 10, 10 TITLETEXT oText1 OF oTitle1 TEXT "FIVEWIN 9.07" FONT oFont1 BRUSH oBrush1
...
...
//Title 5 Horizontal( Down )
@ 480, 150 TITLE oTitle5 size 460, 60 of oWnd SHADOW BOTTOMLEFT SHADOWSIZE 2
@ 5, 10 TITLEIMG OF oTitle5 BITMAP "../bitmaps\32X32\keys.bmp" SIZE 30, 30 REFLEX TRANSPARENT ANIMA
@ 20, 60 TITLETEXT OF oTitle5 TEXT "<== Move over me" COLOR CLR_BLACK
@ 14, 220 TITLETEXT OF oTitle5 TEXT "FIVEWIN 9.07" COLOR CLR_BLACK FONT oFont2 3d
@ 5, 400 TITLEIMG OF oTitle5 BITMAP "../bitmaps\fivetech.bmp" SIZE 30, 30 REFLEX ;
ACTION oText1:SetText( "New text" )
Best Regards
Uwe![Laughing :lol:](./images/smilies/icon_lol.gif)
in File : \samples\testtitl.prg change / add these lines for a Test :
Local oText1
...
...
// Title 1 Horizontal ( top )
@ 015,150 TITLE oTitle1 size 460, 60 of oWnd SHADOW TOPRIGHT
oTitle1:aGrdBack = { { 1, nRGB( 129, 130, 138 ), nRGB( 59, 60, 62 ) } }
oTitle1:nShadowIntensity = 70
@ 10, 10 TITLETEXT oText1 OF oTitle1 TEXT "FIVEWIN 9.07" FONT oFont1 BRUSH oBrush1
...
...
//Title 5 Horizontal( Down )
@ 480, 150 TITLE oTitle5 size 460, 60 of oWnd SHADOW BOTTOMLEFT SHADOWSIZE 2
@ 5, 10 TITLEIMG OF oTitle5 BITMAP "../bitmaps\32X32\keys.bmp" SIZE 30, 30 REFLEX TRANSPARENT ANIMA
@ 20, 60 TITLETEXT OF oTitle5 TEXT "<== Move over me" COLOR CLR_BLACK
@ 14, 220 TITLETEXT OF oTitle5 TEXT "FIVEWIN 9.07" COLOR CLR_BLACK FONT oFont2 3d
@ 5, 400 TITLEIMG OF oTitle5 BITMAP "../bitmaps\fivetech.bmp" SIZE 30, 30 REFLEX ;
ACTION oText1:SetText( "New text" )
Best Regards
Uwe
![Laughing :lol:](./images/smilies/icon_lol.gif)
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.
i work with FW.
If you have any questions about special functions, maybe i can help.
- Marco Turco
- Posts: 858
- Joined: Fri Oct 07, 2005 12:00 pm
- Location: London
- Contact:
Re: Changing the tTitle text at runtime
Hi Uwe,
your last sample runs well but is there a solution to change the text directly from oTitle1 ?
your last sample runs well but is there a solution to change the text directly from oTitle1 ?
Best Regards,
Marco Turco
SOFTWARE XP LLP
Marco Turco
SOFTWARE XP LLP
Re: Changing the tTitle text at runtime
Marco,
it works the same, also from inside the same Title
LOCAL oText1, oText2
//Title 5 Horizontal( Down )
@ 480, 150 TITLE oTitle5 size 460, 60 of oWnd SHADOW BOTTOMLEFT SHADOWSIZE 2
@ 5, 10 TITLEIMG OF oTitle5 BITMAP "../bitmaps\32X32\keys.bmp" SIZE 30, 30 REFLEX TRANSPARENT ANIMA ;
ACTION oText2:SetText( "<== Text changed" )
@ 20, 60 TITLETEXT oText2 OF oTitle5 TEXT "<== Move over me" COLOR CLR_BLACK
@ 14, 220 TITLETEXT OF oTitle5 TEXT "FIVEWIN 9.07" COLOR CLR_BLACK FONT oFont2 3d
@ 5, 400 TITLEIMG OF oTitle5 BITMAP "../bitmaps\fivetech.bmp" SIZE 30, 30 REFLEX ;
ACTION oText1:SetText("New text")
Best Regards
Uwe![Laughing :lol:](./images/smilies/icon_lol.gif)
it works the same, also from inside the same Title
LOCAL oText1, oText2
//Title 5 Horizontal( Down )
@ 480, 150 TITLE oTitle5 size 460, 60 of oWnd SHADOW BOTTOMLEFT SHADOWSIZE 2
@ 5, 10 TITLEIMG OF oTitle5 BITMAP "../bitmaps\32X32\keys.bmp" SIZE 30, 30 REFLEX TRANSPARENT ANIMA ;
ACTION oText2:SetText( "<== Text changed" )
@ 20, 60 TITLETEXT oText2 OF oTitle5 TEXT "<== Move over me" COLOR CLR_BLACK
@ 14, 220 TITLETEXT OF oTitle5 TEXT "FIVEWIN 9.07" COLOR CLR_BLACK FONT oFont2 3d
@ 5, 400 TITLEIMG OF oTitle5 BITMAP "../bitmaps\fivetech.bmp" SIZE 30, 30 REFLEX ;
ACTION oText1:SetText("New text")
Best Regards
Uwe
![Laughing :lol:](./images/smilies/icon_lol.gif)
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.
i work with FW.
If you have any questions about special functions, maybe i can help.
- Marco Turco
- Posts: 858
- Joined: Fri Oct 07, 2005 12:00 pm
- Location: London
- Contact:
Re: Changing the tTitle text at runtime
I mean something like oTitle1:xcontrol:settext("new text").
Best Regards,
Marco Turco
SOFTWARE XP LLP
Marco Turco
SOFTWARE XP LLP
Re: Changing the tTitle text at runtime
Hello Marco,
You don't need to define the Title, only the Textobject.
This button ( on Mainwindow ) changes the Text defined in Title 1.
// Style 2007
// -------------
@ 580, 300 BTNBMP oBtn1 OF oWnd ;
SIZE 200, 80 ;
PROMPT "&Change Text" 2007 ;
FONT oFont2 CENTER ;
ACTION oText1:SetText("FIVEWIN 9.10")
There could be another Combination :
A window with Titles, a Dialog and from inside the Dialog changing a Title-text of a Window-title.
...
...
ACTIVATE WINDOW OWND MAXIMIZED ;
ON INIT TEST_DLG( oWnd, oText1 )
...
...
FUNCTION TEST_DLG( oWnd, oText1 )
LOCAL oDlg
DEFINE DIALOG oDlg FROM 10, 10 TO 20, 45 OF oWnd ;
TITLE "Change Title-text" STYLE nOr( WS_VISIBLE, WS_OVERLAPPEDWINDOW )
@ 2, 2 BUTTON "&Change Title-text" ACTION oText1:SetText( "FIVEWIN 9.10" )
ACTIVATE DIALOG oDlg CENTERED
RETURN( NIL )
Best Regards
Uwe![Laughing :lol:](./images/smilies/icon_lol.gif)
You don't need to define the Title, only the Textobject.
This button ( on Mainwindow ) changes the Text defined in Title 1.
// Style 2007
// -------------
@ 580, 300 BTNBMP oBtn1 OF oWnd ;
SIZE 200, 80 ;
PROMPT "&Change Text" 2007 ;
FONT oFont2 CENTER ;
ACTION oText1:SetText("FIVEWIN 9.10")
There could be another Combination :
A window with Titles, a Dialog and from inside the Dialog changing a Title-text of a Window-title.
...
...
ACTIVATE WINDOW OWND MAXIMIZED ;
ON INIT TEST_DLG( oWnd, oText1 )
...
...
FUNCTION TEST_DLG( oWnd, oText1 )
LOCAL oDlg
DEFINE DIALOG oDlg FROM 10, 10 TO 20, 45 OF oWnd ;
TITLE "Change Title-text" STYLE nOr( WS_VISIBLE, WS_OVERLAPPEDWINDOW )
@ 2, 2 BUTTON "&Change Title-text" ACTION oText1:SetText( "FIVEWIN 9.10" )
ACTIVATE DIALOG oDlg CENTERED
RETURN( NIL )
Best Regards
Uwe
![Laughing :lol:](./images/smilies/icon_lol.gif)
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.
i work with FW.
If you have any questions about special functions, maybe i can help.
- Marco Turco
- Posts: 858
- Joined: Fri Oct 07, 2005 12:00 pm
- Location: London
- Contact:
Re: Changing the tTitle text at runtime
I know. The problem is that I manage all my app windows thorough a routine that return me only the object related to the tTitle object, not the tTitleText of tTitle object. It is for this reason that I can't use directly the tTitletext object and I need to find a solution through the tTitle object.
Best Regards,
Marco Turco
SOFTWARE XP LLP
Marco Turco
SOFTWARE XP LLP