Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to disable items in a Listbox?
Message
From
10/01/1997 09:03:16
Narendra Lilaramani
Gentech Business Machines Ltd
Ahmedabad, India
 
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00016895
Message ID:
00017004
Views:
70
>>How to disable particular items in a Listbox/Combobox control? I have tried using '\' operator as it was used in Foxpro 2.x but its is not working in VFP.
>>
>I've got listboxes in 5.0 that are using the "\" to create a disabled
>item. It still works this way.
>
>THISFORM.lstBox1.List(i) = "\" + THISFORM.lstBox1.List(i)
Thanks for reply. You are right. But as i used in form (I am using VFP 3.0), I found a strange behaviour. My form works this way. There is one spinner, text1 & text2 and a list box list1. Now list1 is populated with an array in which some of the items are disabled with '/'. Initialy list1 is disabled. when text box2 gets focus list1 is enabled. When list1 gets enabled on gotfocus event of text2, it shows all the items enabled. Buand i can select the items which were disabled eith '/'. Now i found that if i scroll through list1 again those items got disabled. In short when text2 gets focus, to duisable items i have to scroll through listbox. I can't understand this strange behavor. Am i doing something wrong....?
Previous
Reply
Map
View

Click here to load this message in the networking platform