Hi
I have a xbrowse with an empty array at any given time will fill this array with data and the first column to 0 for unchecked record. How to set this column with bitmap check and unckeck when clicked?
Thanks.
WITH OBJECT oBrw:InsCol( 1 )
:cHeader := "Selected"
:SetCheck( { "blackdot", nil }, .t. )
:bKeyChar := { |k| If( k == 32, ( oBrw:oCol( 1 ):CheckToggle(), 0 ), nil ) }
END
Antonio Linares wrote:Here you have an example:
- Code: Select all Expand view
WITH OBJECT oBrw:InsCol( 1 )
:cHeader := "Selected"
:SetCheck( { "blackdot", nil }, .t. )
:bKeyChar := { |k| If( k == 32, ( oBrw:oCol( 1 ):CheckToggle(), 0 ), nil ) }
END
But I think that it should use a logical value instead of a zero
// Testxbrw.prg y testxbrw.rc
oCol:SetCheck( { "GREEN", "RED" }, {|o, v| (DBRLOCK(), _FIELD->Married := v, DBUNLOCK() ) } )
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: No registered users and 82 guests