I did try to build a custom control but unfortunately i couldn't make it work due to lack of knowledge.
Does anyone has any simple example about creating custom controls?
Shortly: I wanted to build an custom itemlist that allowed me to add 2 or 3 icons beneath it with labels associated.
Not really sure what you mean by an "ItemList". Sounds like a ListBox. Can you elaborate, maybe cook up a "screenshot" in paint or whatever?
Anyway, first of all you'll have to differentiate between a custom control and a UserControl.
A UserControl is a 'container' of other existing controls. See it as a 'template', which you create once (just like a form) and can drag to any form as many times as you like. A UserControl often contains multiple controls, such as a TextBox with a ToolStrip above it, or a bunch of Buttons combined into one control.
A custom control is a class that inherits an existing control, such as a TextBox, ListBox, Button, or whatever. This way, you can extend that control with your own behavior. You can, for most controls, control the way the control draws itself for example.
Judging by your description, you want a UserControl, but I can't be sure.
I've made a bunch of custom controls (might be a UserControl or two in there too), most of which are listed in my signature. Check them out for examples.
I would like to use a ListBox...attached a small example of what i would like to build, note that in a near future i would like to implement the same solution but in a windows mobile 6.1 or 6.5 professional.
A usercontrol would probably be best in this situation. You can make it to look like an individual block of that picture. And then create a new instance of one per customer (or whatever those names pertain to).
Justin
You down with OOP? Yeah you know me!
MCAD and MCMICKEYMOUSE (vb.net)
I've never work with that kind of programming, would you provide me a small example on how would i have to control each clicked item/sub-item and create those "advanced" items?
Not really sure what you mean by an "ItemList". Sounds like a ListBox. Can you elaborate, maybe cook up a "screenshot" in paint or whatever?
Anyway, first of all you'll have to differentiate between a custom control and a UserControl.
A UserControl is a 'container' of other existing controls. See it as a 'template', which you create once (just like a form) and can drag to any form as many times as you like. A UserControl often contains multiple controls, such as a TextBox with a ToolStrip above it, or a bunch of Buttons combined into one control.
A custom control is a class that inherits an existing control, such as a TextBox, ListBox, Button, or whatever. This way, you can extend that control with your own behavior. You can, for most controls, control the way the control draws itself for example.
Judging by your description, you want a UserControl, but I can't be sure.
I've made a bunch of custom controls (might be a UserControl or two in there too), most of which are listed in my signature. Check them out for examples.
Thanks for the tip, i already built the demo using your ColorListBox.vb and made some tweeks so i can add the icons+labels+control colors, etc. Problem is, i can't detect mouse click on those drawed pictures. Also i'm out of ideas on how to workaround the wanted behavior. Any idea?