Container-like control similar to toolbar

MadManMarkAu

New member
Joined
Aug 19, 2009
Messages
1
Programming Experience
10+
Forgive me if this has been answered elsewhere, but I need advice ASAP (Our project is behind schedule)

I'm writing a "SlideMenu" control that has a group of objects the user can click. My current program layout is as follows:

* Control has a "Headers" property that returns a SlideMenuHeaders object.
* SlideMenuHeaders class inherits CollectionBase
* Items stored in SlideMenuHeaders class are all "SlideMenuHeader" objects.

Is there a way that each SlideMenuHeader object stored in the SlideMenuHeaders object can have an event accessible from the form containing my UserControl?

I'm thinking of an effect similar to the toolbar control, where objects can be added to the toolbar, and each object can raise events in the form.

Am I going about this the wrong way?

Also, this probably ties in with the above question, and indeed may be solved if the above question is solved. The items my control contains - how do I make the items have a "Name" property? When I edit the items from the Collection Editor accessible from the controls property list, my contained items do not have names. Any help?
 
A simple approach could be to use a usercontrol with a flowlayout panel set to dock.fill. Then add a button that launches a form to set or remove new buttons, point all the new button click events (addhandler) to a sub that picks out the sender by it text/image (select case would work here) and routes it to a sub that handles that task/operation you desire.
 
Back
Top