FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour xBrowse ( follow up )
Posts: 2706
Joined: Fri Oct 07, 2005 01:50 PM
xBrowse ( follow up )
Posted: Fri Mar 20, 2009 07:55 PM

Just a quick question .. when xBrowse opens and goes to the first record .. why is the very top left cell always hi-lited in black .. if you click on it it will turn the correct color .. I do have on init oBrw:SetFocus() .. but that does not seem to effect the initial first cell as xbrow opens ..

Any thoughts as how to move the cursor to the first cell so the listbox becomes active ?

Thanks
Rick Lipkin

Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Re: xBrowse ( follow up )
Posted: Fri Mar 20, 2009 09:53 PM

Hello Rick,

There are two color-settings

// xBrowse got Focus Color Row/Cell - Text and Background
// ---------------------------------------------------------------------
oLbx:bClrSelFocus = { || { SEL_TEXTCOLOR, SEL_BACKCOLOR } }
// Black Text on White Background
oLbx:bClrSelFocus = { || { 0, 16777215 } }

// xBrowse Lost Focus Color Text and Background
// ---------------------------------------------------------
oLbx:bClrSel = { || { LOST_TCOLOR, LOST_BCOLOR } }
// Black Text on White Background
oLbx:bClrSel = { || { 0, 16777215 } }

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: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: xBrowse ( follow up )
Posted: Sat Mar 21, 2009 05:25 PM

This is a problem only when browse is in a dialog and browse is not the first control defined. "ON INIT oBrw:SetFocus()" does not help. Whatever we do ( as far as I know ), the first control defined gets focus when the dialog is activated.

In such cases, ( till I learn a better way ) I define the browse as the first control and then define all other controls ( even those which appear above the browse ). Alternatively I remove WS_TABSTOP from the controls defined prior to browse.

If I create the dialog from resources, either I change the taborder or remove WS_TABSTOP style from the earlier controls.

I am also interested in knowing if there is a better way.

Regards



G. N. Rao.

Hyderabad, India
Posts: 2365
Joined: Wed Nov 02, 2005 11:46 PM
Re: xBrowse ( follow up )
Posted: Sat Mar 21, 2009 06:52 PM
Rick Lipkin

please try with

ON INIT( oBrw:SetFocus(), .F. )
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: xBrowse ( follow up )
Posted: Sat Mar 21, 2009 07:02 PM

Excellant
Thanks Mr Daniel.

Now I recollect that it was long time back solved in these forums too.
Regret I forgot

Regards



G. N. Rao.

Hyderabad, India
Posts: 2706
Joined: Fri Oct 07, 2005 01:50 PM
Re: xBrowse ( follow up )
Posted: Sat Mar 21, 2009 08:21 PM

Daniel

YES .. ON INIT( oBrw:SetFocus(), .F. ) worked perfectically !!!!

Many thanks
Rick Lipkin

Continue the discussion