Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Determine whether an item is disabled
Message
From
04/06/2003 16:38:35
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00796336
Message ID:
00796378
Views:
13
Okay, I'm back. I'd probably add another field that contains a flag whether or not the item is disabled. Set columnCount so it will not show this field in the listbox.

For example, using addListItem() to add items (in init() method):
this.addListItem("One", 1, 1)
this.addListItem("Y", 1, 2)
this.addListItem("\two", 2, 1)
this.addListitem("N", 2, 2)
this.addListItem("three", 3, 1)
this.addListItem("Y", 3, 2)
Then, .listitem(2, 2) will contain "N", showing it is disabled...

Interesting thing about disabled items in listboxes...dblclick() does not fire if you double click item with the mouse, but if you arrow to the disabled item and hit enter, dblclick() *does* fire...so they don't really work like I'd expect. (I'm using VFP6 SP5). Adding a flag like above gives something to check against.

>Hi everybody,
>
>An item in a ListBox or ComboBox control can be disabled by placing a backslash (\) before the item. How do I determine whether an item is disabled or not?
>
>Thank you,
>Ali
Steve Gibson
Previous
Reply
Map
View

Click here to load this message in the networking platform