How could I populate a ComboBox (or a ToolStripComboBox like in the image) with line styles .NET?
+1
A:
You need to draw the items yourself. The ComboBox has a DrawItem
event for that. You can get both the boundaries of the item and the graphics context from the event arguments.
You'll need to set the DrawMode property on the ComboBox to OwnerDrawFixed for that to work, though.
I'm assuming that finding the DashStyle enumeration and creating an item for each enum value is not your problem here.
Joey
2010-04-22 09:21:57
Thanks. Did't tryed, however, but after some reflections reformulated in this: http://stackoverflow.com/questions/2690044/display-colorpicker-net
serhio
2010-04-22 10:54:14
Could I use the same things for the example in the question from the link?..
serhio
2010-04-22 11:20:54