General information
Category:
Forms & Form designer
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
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