Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Determine whether an item is disabled
Message
De
04/06/2003 16:38:35
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00796336
Message ID:
00796378
Vues:
12
Okay, I'm back. I'd probably add another field that contains a flag whether or not the item is disabled. Set columnCount so it will not show this field in the listbox.

For example, using addListItem() to add items (in init() method):
this.addListItem("One", 1, 1)
this.addListItem("Y", 1, 2)
this.addListItem("\two", 2, 1)
this.addListitem("N", 2, 2)
this.addListItem("three", 3, 1)
this.addListItem("Y", 3, 2)
Then, .listitem(2, 2) will contain "N", showing it is disabled...

Interesting thing about disabled items in listboxes...dblclick() does not fire if you double click item with the mouse, but if you arrow to the disabled item and hit enter, dblclick() *does* fire...so they don't really work like I'd expect. (I'm using VFP6 SP5). Adding a flag like above gives something to check against.

>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
Steve Gibson
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform