-
hi,
is there a way to put colored boxes (like in microsoft frontpage, i don't know any other program that do this) inside a combo box?
it will look like this:
--------------------------
|combo blah blah|
--------------------------
|[.].red................|
|[.].blue..............|
|[.].green............|
|[.].custome........|
--------------------------
(space where dot is)
and in the last box (custome) i activate a color choosing dialog and the box changes to that color..
this should work some how with the commond color sialog, it wont work wit an image combo because there are no images, just colored boxes. (that can change to the color of my
choice). if you have internet explorer, then you probrbly have frontpage too, look for it, it will explain everything better then i can.
thanks..
-
On a form insert an ImageList and an ImageCombo.
1. Set the ImageList's Size property to 16x16.
2. Set the ImageCombo's Image List propert to ImageList1.
3. Insert some images in it (just jot some colors in MS Paint or whatever.
4. Use this code:
Code:
ImageCombo1.ComboItems.Add , , "Blue", 1
ImageCombo1.ComboItems.Add , , "Red", 2
ImageCombo1.ComboItems.Add , , "Green", 3
ImageCombo1.ComboItems.Add , , "Yellow", 4
'The numbers after the text is the index numbers of the images in the ImageList Control.
Hope I helped!
:)
-
Hey I found something you might want to see...
I think with a bit modifications it can be placed in a ComboBox, or in any case in a command button... take a look at it!
http://www.mvps.org/vbnet/code/neet/colourselect.htm