Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Determine whether an item is disabled
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00796336
Message ID:
00796484
Vues:
17
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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform