Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Checkboxes in Listboxes
Message
From
26/08/1999 05:28:33
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00257453
Message ID:
00257771
Views:
14
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform