FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Hi-Lite get fields like the old Dos days
Posts: 2706
Joined: Fri Oct 07, 2005 01:50 PM
Hi-Lite get fields like the old Dos days
Posted: Thu Mar 12, 2020 09:39 PM

To All

Let me ask this question another way ... remember in the old dos days .. when you tabbed or hit enter to go to the next get .. the field get would turn another color ( yellow perhaps ) .. is there a global setting ( or code ) that will turn the get field a different color when the field is in focus ... I have a complex form with lots of gets .. it is very difficult to see the cursor when it moves from field to field .. I just need a way to turn the field get to a hi-lited color .. that would help the users to know where they are in the form.

Thanks
Rick Lipkin

Posts: 1096
Joined: Fri Oct 28, 2005 02:27 AM
Re: Hi-Lite get fields like the old Dos days
Posted: Fri Mar 13, 2020 02:57 AM
Maybe

Code (fw): Select all Collapse
TGet():nClrFocus := 16577214
TGet():lClrFocus := .t.
FWH 11.08/FWH 19.12

BCC5.82/BCC7.3

xHarbour/Harbour
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Hi-Lite get fields like the old Dos days
Posted: Fri Mar 13, 2020 08:27 AM
Simpler
Code (fw): Select all Collapse
SetGetColorFocus()
Regards



G. N. Rao.

Hyderabad, India
Posts: 2706
Joined: Fri Oct 07, 2005 01:50 PM
Re: Hi-Lite get fields like the old Dos days
Posted: Sun Mar 15, 2020 05:13 PM

Rao

SetGetColorFocus() .. 2 questions

1) do you have a short example ??
2) I would prefer to use this function when and where I need it .. and not be a global setting ..

Thanks
Rick Lipkin

Posts: 838
Joined: Wed Aug 22, 2007 10:09 AM
Re: Hi-Lite get fields like the old Dos days
Posted: Sun Mar 15, 2020 06:46 PM

Rick,

It is a global setting to be called at the beginining of main()

Saludos / Regards,



FWH 20.04, Harbour 3.2.0 dev (r1909261630) y BCC 7.40
Posts: 1364
Joined: Wed Jun 21, 2006 12:39 AM
Re: Hi-Lite get fields like the old Dos days
Posted: Mon Mar 16, 2020 01:00 AM
Hello, if you want to customize

Code (fw): Select all Collapse
oGet : bGotFocus := { || oGet : SetColor( 0, CLR_GRAY ) }
oGet : bLostFocus := { || oGet : SetColor( 0, CLR_WHITE ) }


Saludos
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Hi-Lite get fields like the old Dos days
Posted: Mon Mar 16, 2020 04:54 AM
Rick Lipkin wrote:Rao

SetGetColorFocus() .. 2 questions

1) do you have a short example ??
2) I would prefer to use this function when and where I need it .. and not be a global setting ..

Thanks
Rick Lipkin


1) Just put it in one of your applications and see the difference.

2)
Syntax:
Code (fw): Select all Collapse
SetGetColorFocus( [nClr] )


You can also use it as a Global setting or keep changing / toggling it wherever you want in your program.
All Gets created after this setting and before you change the setting use this color for focused gets.

Code (fw): Select all Collapse
SetGetColorFocus( CLR_WHITE )

Restores normal behavior.
Regards



G. N. Rao.

Hyderabad, India

Continue the discussion