>>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?
Have you tried setting a different DisabledItemForeColor property for the listbox? The default has both enabled and disabled colors the same. I tried it and it does work.
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only