FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Class TMultiGet - Focus Color
Posts: 933
Joined: Sun Oct 09, 2005 01:05 PM
Class TMultiGet - Focus Color
Posted: Thu Feb 14, 2013 01:08 AM

Hi,

With a regular get I can set the focus color with:
oGet:SetGetColorFocus( RGB(152,251,152) )

How can I do this with a multiget? Is it possible?

Thanks,

Jeff Barnes



(FWH 16.11, xHarbour 1.2.3, Bcc730)
Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Re: Class TMultiGet - Focus Color
Posted: Thu Feb 14, 2013 01:00 PM
Jeff,
it is a little bit tricky.
I noticed ( with a alert ) during reading the lines in a multiline get,
the focus status changed for each line from focus to lost focus.
Maybe a bug ?

see what happens, changing these lines of the multiline get inside the working function to :

@ 3, 10 GET oGet1 VAR cVar OF oDlg SIZE 95, 30 MULTILINE
oGet1:bGotFocus := {|| MsgAlert( "Got Focus" ), oGet1:SetColor( , 11251710 ), oGet1:Refresh() }
oGet1:bLostFocus := {|| MsgAlert( "Lost Focus" ), oGet1:SetColor( , 15973519 ), oGet1:Refresh() }


I got it working like :



function Main()
Local oGet1, oGet2, lFocus1 := .F.
local cVar:="lalalalala",cVar1:="hoplalalalala"

DEFINE DIALOG oDlg FROM 1,10 TO 24,60

@ 1, 12 BUTTON "&End" OF oDlg ACTION oDlg:end()

// only read focus status once !!!
// ---------------------
@ 3, 10 GET oGet1 VAR cVar OF oDlg SIZE 95, 30 MULTILINE
oGet1:bGotFocus := {|| lFocus1 := .T.,;
IIF( lFocus1 = .T., oGet1:SetColor( , 11251710 ), NIL ), oGet1:Refresh() }


oGet1:bLostFocus := {|| lFocus1 := .F.,;
oGet1:SetColor( , 15973519 ), oGet1:Refresh() }


@ 8, 10 GET oGet2 VAR cVar1 OF oDlg SIZE 95, 15

ACTIVATE DIALOG oDlg

return NIL

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: 933
Joined: Sun Oct 09, 2005 01:05 PM
Re: Class TMultiGet - Focus Color
Posted: Thu Feb 14, 2013 01:15 PM

Thank you Uwe ... Works perfectly :D

Thanks,

Jeff Barnes



(FWH 16.11, xHarbour 1.2.3, Bcc730)

Continue the discussion