FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour xBrowse: How to detect when value in a SetCheck col changed?
Posts: 1096
Joined: Fri Oct 28, 2005 02:27 AM
xBrowse: How to detect when value in a SetCheck col changed?
Posted: Tue Jul 22, 2014 05:50 AM

Hi all,
How to detect when a value in a SetCheck col is changed or toggled? I tried with oBrw:bChange and oCol:bEditValid with no success.

Marquee style is set to MARQSTYLE_DOTEDCELL and am browsing an array.

I'm using FWH11.8.

TIA

FWH 11.08/FWH 19.12

BCC5.82/BCC7.3

xHarbour/Harbour
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: xBrowse: How to detect when value in a SetCheck col changed?
Posted: Tue Jul 22, 2014 10:09 PM

oCol:bOnChange := { |oCol, uOldVal| MyFuncOnChange( oCol, uOldVal ) }

Regards



G. N. Rao.

Hyderabad, India
Posts: 1096
Joined: Fri Oct 28, 2005 02:27 AM
Re: xBrowse: How to detect when value in a SetCheck col changed?
Posted: Wed Jul 23, 2014 03:00 AM

Thanks Rao!

When user checked a row, I want to display a message at the top using a say control. That can now be accomplished using bOnChange.

However once user click somewhere else, in other words the col lost focus, I want to erase that message. Is there such a bLostFocus data?

TIA

FWH 11.08/FWH 19.12

BCC5.82/BCC7.3

xHarbour/Harbour
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: xBrowse: How to detect when value in a SetCheck col changed?
Posted: Wed Jul 23, 2014 03:45 AM

You can use oBrw:bChange.

You must be alrady aware that oBrw:bChange is evaluated when row is changed.
If we set oBrw:lColChangeNotify := .t., then oBrw:bChange is called even when column is changed.

oBrw:lColChangeNotify := .t.
oBrw:bChange := { |oBrw, lRowChange| MyChangeFunc( oBrw, lRowChange ) }

In the MyChangeFunc(....) check the oBrw:SelectedCol() to know which column is selected.

Regards



G. N. Rao.

Hyderabad, India
Posts: 1096
Joined: Fri Oct 28, 2005 02:27 AM
Re: xBrowse: How to detect when value in a SetCheck col changed?
Posted: Wed Jul 23, 2014 04:11 AM

Thank you so much Rao!

FWH 11.08/FWH 19.12

BCC5.82/BCC7.3

xHarbour/Harbour

Continue the discussion