Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to tell if a listbox item is disabled?
Message
From
08/01/1997 04:27:55
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00016664
Message ID:
00016724
Views:
58
>I have found that the old 2.6 method of disabling a specific item in a listbox ("\" + text) still disables
>an item in a 5.0 listbox. Once disabled though, how, in code does one recognize a disabled item? The "\" is not part of the text in a listbox item and .Enabled if for the entire listbox not a specific item.

As far as I can see, you don't know something is disabled.

As you say, the "\" is not returned as part of the .list[] property so you can do things like .list[.listindex] = .list[.listindex] to remove the disabled flag which will always work.
Similarly .list[.listindex] = "\"+.list[.listindex] will always work without adding more and more "\" characters to the value.

It's quite tricky the way it is...


Why do you want to know if something is enabled?
Surely if it's not enabled the user can't have chosen it?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform