Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Listbox Questions
Message
De
28/04/2009 10:25:15
 
 
À
28/04/2009 10:15:19
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 7 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Divers
Thread ID:
01396673
Message ID:
01396676
Vues:
70
>I have two questions regarding listbox control:
>
>1. I have a listbox that contains two columns. Is it possible, when right clicking on the listbox, to determine whether the click came in the first or second column? If possible, how do you go about doing this?
>
>2. Is it possible to disable certain rows in a listbox?
>
>Thanks for any help.

You can disable listbox item(s) by preceding it by slash '\', e.g.
With Thisform.Listbox
  AddItem('Enabled')  
  AddItem('\Disabled')
Endwith
You could explicitly set listbox column width, by setting ColumnWidths property, and then check actual mouse location in Listbox.Click event; but it make sense to use grid instead of listbox to get this and many other functionalities.
Edward Pikman
Independent Consultant
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform