xBrowse Image on inserted column
Posted: Tue Jul 29, 2008 1:33 am
Hello all!
I have this xbrowse which load the table and all fields are displayed accordingly...
I inserted below code and wanted to display the image depending on the value of :bEditValue...
How can I switch :bEditValue from 1 to 2 and vice-versa by double-clicking on the column?
If the inserted column is a field, it would not be the problem... but with the inserted column, i'm in trouble.
'Appreciate any help.
Regards,
I have this xbrowse which load the table and all fields are displayed accordingly...
I inserted below code and wanted to display the image depending on the value of :bEditValue...
Code: Select all
...
oBrwPIC:InsCol( 2 )
oBrwPIC:aCols[2]:bEditValue := {|e| IF(e == Nil, 1, e) }
oBrwPIC:aCols[2]:addResource( 'checkbox16' )
oBrwPIC:aCols[2]:addResource( 'crossbox16' )
oBrwPIC:aCols[2]:bBmpData := {|| Eval(oBrwPIC:aCols[2]:bEditValue) }
oBrwPIC:aCols[2]:bLDClickData := {|x| x := Eval(oBrwPIC:aCols[2]:bEditValue),;
IF( x == 1, Eval(oBrwPIC:aCols[2]:bEditValue, 2),;
Eval(oBrwPIC:aCols[2]:bEditValue, 1) ),;
oBrwPIC:RefreshCurrent() }
...
How can I switch :bEditValue from 1 to 2 and vice-versa by double-clicking on the column?
If the inserted column is a field, it would not be the problem... but with the inserted column, i'm in trouble.
'Appreciate any help.
Regards,