Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Disabling Elements of a ComboBox
Message
From
07/06/2001 11:05:37
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00516264
Message ID:
00516358
Views:
13
Hi!

Mrk, you can do this for any RowSourceType. Just do something like following:
* assume oCombo is a reference to the combobox and idxToDisable is an item index to disable
for i=1 to oCombo.ColumnCount
&& disable
oCombo.List[idxToDisable,i]='\'+oCombo.List[idxToDisable,i]
endfor

To enable element, just do oCombo.List[idxToEnable,i]=oCombo.List[idxToEnable,i].

HTH.


>>Hi.
>>I have a combobox in a form and
>>when i click it, it opens and show
>>7 elements from where i can choose.
>>My question is:
>>It's possible to disabled elements
>>of that combobox (for example, the
>>second and the sixth)?
>>If yes, how can i do that?
>
>If you make your RowSourceType an array, it is quite easy to enable and disable items in the array. Precede each value to be disabled with a back-slash \
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.com
ICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs

It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.
Previous
Reply
Map
View

Click here to load this message in the networking platform