Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

list in combobox problem...

Status
Not open for further replies.

keeyean

MIS
Sep 29, 2001
32
0
0
US
i have 3 selections in a combobox...
can i make it to..
case1, only the first alternative can be selected, but the other 2 alternatives are locked...
case2, only second alternative can be selected and
case3, only thrid alternative can be selected...

thanz you..
 
Sounds to me like you may want to review whether a combobox is the right control to be using. Not because it is impossible to do what you are asking, but because the scenario you describe suggests that a combobox may be the wrong thing to be using.
 
hmm .. what i'm trying to explain at here is...
i have 7 selections in a combobox...
can i make it to..
case1, only 3 alternatives can be selected, but the other 2 alternatives are locked...
case2, only 5 alternatives can be selected and
case3, all 7 alternatives can be selected...
 
Brute force. Square pegs do fit into round holes. In your click event, validate the listIndex. For invalid selections, set listIndex to zero or a valid index value.

Identifying valid indicies complicates this solution especially with a dynamic or volitle list.

Another choice is to eliminate your problem...
Reset the list when the "case" or selection criteria changes. This way your list contains only valid selections. Do you really want to force your users to look at seven items when only three apply?



Wil Mead
wmead@optonline.net

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top