FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Change GET TEXT COLOR when GET Focused.
Posts: 336
Joined: Mon Dec 07, 2009 02:49 PM
Change GET TEXT COLOR when GET Focused.
Posted: Sat Oct 27, 2012 11:02 AM

Hi ,

I want to change the TEXT Color ONLY when GET is focused. Please guide me how I can set it ?

Thanks in advance..!
Shridhar

Thanks

Shridhar

FWH 24.04, BCC 7 32 bit, MariaDB
Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
Re: Change GET TEXT COLOR when GET Focused.
Posted: Sat Oct 27, 2012 11:14 AM

Shridhar,
maybe SetGetColorFocus() is what you are looking for.
Best regrads,
Otto

Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Re: Change GET TEXT COLOR when GET Focused.
Posted: Sat Oct 27, 2012 11:29 AM
Shridhar,

Changing a SINGLE-get ( not global !!! ),
otherwise Ottos solution.

REDEFINE GET oGet VAR nTickCount ID 970 PICTURE "99999" OF oDlg UPDATE

This changes the GET ON FOCUS to RED with black text
oGet1:bGotFocus := { | nKey, nFlags | oGet:SetColor( 0, 255 ) }

This changes the GET to WHITE with black text
oGet1:bLostFocus := { | nKey, nFlags | oGet:SetColor( 0, 16777215 ) }

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: 336
Joined: Mon Dec 07, 2009 02:49 PM
Re: Change GET TEXT COLOR when GET Focused.
Posted: Sat Oct 27, 2012 11:50 AM

Hi Otto, Uwe ,

Want to set globally but, as SetGetColorFocus() function I can set color only for Background not for Text. Is there any way so I can set color for both Text and Background globally ?

Thanks
Shridhar

Thanks

Shridhar

FWH 24.04, BCC 7 32 bit, MariaDB

Continue the discussion