FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Stupid question
Posts: 1091
Joined: Thu Nov 17, 2005 11:08 AM
Stupid question
Posted: Thu Jan 26, 2012 10:51 AM
Is it possible to modify runtime the picture of a TSay object?


Code (fw): Select all Collapse
#include "fivewin.ch"
FUNCTION MAIN()
LOCAL oDlg
LOCAL oSay , cSay := "99"
LOCAL oBut1 , oBut2
LOCAL oFont

DEFINE FONT oFont NAME "Arial" SIZE 0 , -14

DEFINE DIALOG oDlg   FONT oFont

@ 1 ,  1 SAY oSAY PROMPT cSay OF oDlg BORDER COLOR CLR_BLACK , CLR_WHITE

@ 3 ,  1 BUTTON oBut1 ACTION ( oSay:oFont:lBold := .T.  , oSay:repaint(.T.) )
@ 3 , 10 BUTTON oBut2 ACTION ( oSay:oFont:lBold := .F.  , oSay:repaint(.T.) )

ACTIVATE DIALOG oDlg
RELEASE FONT oFOnt

RETURN NIL
Marco Boschi
info@marcoboschi.it
Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Re: Stupid question
Posted: Thu Jan 26, 2012 11:02 AM
Marco,

You can use SetFont. Changing Colors, works the same.

oSAY:SetFont( oFont )

oSAY:SetColor( nTextColor, nBackColor )

oSAY:Refresh()

Best 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.
Posts: 1091
Joined: Thu Nov 17, 2005 11:08 AM
Re: Stupid question
Posted: Thu Jan 26, 2012 04:48 PM

Good!
Thanks

Marco Boschi
info@marcoboschi.it
Posts: 1091
Joined: Thu Nov 17, 2005 11:08 AM
Re: Stupid question
Posted: Thu Jan 26, 2012 04:55 PM

Uwe,
Is it possile to change only underline property?
marco

Marco Boschi
info@marcoboschi.it
Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Re: Stupid question
Posted: Thu Jan 26, 2012 07:12 PM

Marco,

I think, changing the Fontstyle of a defined Font at Runtime is not possible ?
In case You want to change the Font of a SAY, You could define 2 Fonts ( normal and underline )

Switch from :
oSay:SetFont ( oFontN ) // normal
to :
oSay:SetFont ( oFontU ) // underline

Best Regards
Uwe :lol:

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.
Posts: 1091
Joined: Thu Nov 17, 2005 11:08 AM
Re: Stupid question
Posted: Fri Jan 27, 2012 07:38 AM

Perfect!

Marco Boschi
info@marcoboschi.it

Continue the discussion