Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Listbox Questions
Message
From
28/04/2009 10:25:15
 
 
To
28/04/2009 10:15:19
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 7 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01396673
Message ID:
01396676
Views:
71
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform