|
-
February 15th, 2005, 09:41 AM
#1
Multiple-Select & choice ComboBox with colours
hello...
I would like to implement a drop down menu whcih allows the user to make multiple selections. The user should be able to choose an option and that option to either change colour or have some small bitmap such as a "tick" to indicate that it has been selected.
Also, lets assume that the tittle or initial text displayed by the control is "Food" and that the options are "pasta" "pizza" "nachos" (all the healthy stuff e?)...Now when the user selectes lets say "pizza" then the default text /title of the control should remain food.
I would also need to be able to set some of the options to "disabled mode by graying them out....so some light colour..
I explored with CComboBox but found that it cannot offer the above functionality. Also when you select an option, tht option is then displayed at the top of the drowndown.
It seems that in order to achived this I would need to subclass CComboBox. I have a vague idea as to how it can be changed to do the above. has anybody done this before..is anyboy aware of such a control perhaps existing aready and I have not noticed?
Thanks,
Aristotel
-
February 15th, 2005, 09:48 AM
#2
Re: Multiple-Select & choice ComboBox with colours
You would have to subclass drop list control rather than combo box.
Then implement multiple selections, graying items and intend text by handling custom drawing.
I think if you search this forum or google you will be able to find samples.
There are only 10 types of people in the world:
Those who understand binary and those who do not.
-
February 15th, 2005, 09:59 AM
#3
Re: Multiple-Select & choice ComboBox with colours
Beside of what JohnCz wrote already
it's not a very good idea to use a ComboBox for multiple selections.
They are designed for single selection,
and thats what the users a awaiting from it.
If possible you should think about alternatives like CListCtrl.
-
February 15th, 2005, 10:07 AM
#4
Re: Multiple-Select & choice ComboBox with colours
Hi again..thanks for the advice..
I have already looked at CListCtrl, but it doesnt "drop" and then pull up again...I will look at it again though...it might do for our needs....
one mroe question... JohnCz you mentioned "drop list control"... I am assuming you were reffering to CListCtrl, right? Because I can't seem to find anything on drop list..
thanks!
-
February 15th, 2005, 11:14 AM
#5
Re: Multiple-Select & choice ComboBox with colours
 Originally Posted by greekgoddj
JohnCz you mentioned "drop list control"... I am assuming you were reffering to CListCtrl, right? Because I can't seem to find anything on drop list..
It is not CList control it is list box control to be precise. Window class used to create it is "ComboLBox".
If you want to subclass it use CListBox class.
I am not sure how would you handle showing multiple selection in a combo box though.
Edit control of the combo is displaying single line of text.
There are only 10 types of people in the world:
Those who understand binary and those who do not.
-
February 15th, 2005, 11:22 AM
#6
Re: Multiple-Select & choice ComboBox with colours
Perhaps this control will help. If not, maybe one of these will help.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|