Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Determine whether an item is disabled
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00796336
Message ID:
00796484
Views:
18
Sorry, you are right: it should be listbox.rowsource element. Let us suppose it is a one-dimensional array, then instead of
*if .ListItem(i) = "\"
this should work:
if eval(.Rowsource+"["+alltr(str(i)+"]") = "\"

Appropriate changes should be made if it is not a one-dimesional array or if the listbox is not bound to the array first column.

>Hi Yuri,
>
>Thanks for taking your time, but it is not as simple as you wrote. When I display or check the first charachter of a disabled item, I don't see "\".
>
>Ali
>
>>You can scan Listbox for Listbox.ListItem starting with "\".
>>Something like:
>>with ThisForm.List1
>>FOR i= 1 to .ListCount
>>if .ListItem(i) = "\"
>>*disabled
>>endif
>>endfor
>>endwith
>>
>>>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
Previous
Reply
Map
View

Click here to load this message in the networking platform