Hi, Pete
One more way.
I have a class for multiselect from some table (f.e. address book) based on ListBox. In Init() method I creating cursor with fields If_Sel, VisField & RetField. If_Sel is C(1).
ListBox properties:
ColumnCount = 2
ColumnLines = .F.
ColumnWidths = "15,500"
RowSourceType = 6 - Fields
RowSource = "MyCursor.If_Sel,VisField"
ListBox look as:
+ Pete && selected
Dmitri && not selected
+ Bill && selected
In Click() event I simply write:
if empty(If_Sel)
If_Sel = "+"
else
If_Sel = ""
endif
This.Refresh()
It works fine in my apps.
About Craig's way with to different BMP. In early version my class I do it, and this work fine on lettle tables (~50 recs). But with recs > 1000 I had trouble: when I scan through list pictures periodically disappears... I hadn't time to solve this problem and realize idea above.
Regards,
Dmitri Alexandrov