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.
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 ) }
ENDAntonio Linares wrote:Here you have an example:
 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() ) } )Wanderson,
myarray := { { 1, .t., "Hello" }, {2, .f., "World" } }
oBrw:aCols[2]:AddBmpHandle( "Chk_T" )
oBrw:aCols[2]:AddBmpHandle( "Chk_F" )
oCol:bBmpData := {|| IF( myArray[ oBrw:nArrayAt, 2], 1, 2) }
oCol:bStrData := { || Nil }
Regards
Paco