Valhalla Legends Forums Archive | General Programming | Listing colors & examples In a combobox [VB]

AuthorMessageTime
haZe
I noticed that in most bots that have customizable colors, they have a list of all the colors and a sample next to it. How do I do this?

[color=blue]* ss below, taken from Arty Bot[/color]
[img]http://www.gosugamers.com/colors.JPG[/img]
March 29, 2003, 8:13 PM
Skywing
[quote author=haze the cow link=board=5;threadid=843;start=0#msg6632 date=1048968838]
I noticed that in most bots that have customizable colors, they have a list of all the colors and a sample next to it. How do I do this?

[color=blue]* ss below, taken from Arty Bot[/color]
[img]http://www.gosugamers.com/colors.JPG[/img]
[/quote]I recommend that you investigate the ChooseColor common-dialog function in MSDN.
March 29, 2003, 8:22 PM
haZe
I did, this is what I got
[img]http://www.gosugamers.com/color2.JPG[/img]
How do I add all those colors to a combobox though, plus the name?
March 29, 2003, 8:36 PM
Skywing
[quote author=haze the cow link=board=5;threadid=843;start=0#msg6636 date=1048970199]
I did, this is what I got
[img]http://www.gosugamers.com/color2.JPG[/img]
How do I add all those colors to a combobox though, plus the name?
[/quote]If you want to add them to a combobox, you'll have to do more work (perhaps writing your own function entirely, or using the hook/template/instance members of the CHOOSECOLOR struct). Most programs use the common dialog functions, and those will benefit from future shell improvements whereas yours will not. Of course, you might want to maintain a consistant look across all platforms...
March 29, 2003, 8:42 PM
kamakazie
Trying looking into using ComboBoxEx ( http://www.vbaccelerator.com/codelib/odcbolst/comboex.htm ). Very nice control and should do what you want. You just have to figure out a way to enumerate the colors or you can just hardcode them in.
March 29, 2003, 9:55 PM

Search