Creating toolbar from menu
-
WinForms MDI parent form menu system (MenuStrip and ToolStripMenuItem's) created in designer. ToolStripMenuItems items have text, image properties and onclick event set. At application startup, toolbar should created automatically from specified menu items. Users can select the menu items which are available in toolbar. Anu idea how to implement such toolbar ?
Andrus
-
WinForms MDI parent form menu system (MenuStrip and ToolStripMenuItem's) created in designer. ToolStripMenuItems items have text, image properties and onclick event set. At application startup, toolbar should created automatically from specified menu items. Users can select the menu items which are available in toolbar. Anu idea how to implement such toolbar ?
Andrus
you must create that toolbars at runtime with different tag for each item, but have some single onclick event, than you can manage that known tag to execute another handler, for detailed information search how to create controls at runtime. hope it helps :-\
dhaim programming is a hobby that make some money as side effect :)
-
you must create that toolbars at runtime with different tag for each item, but have some single onclick event, than you can manage that known tag to execute another handler, for detailed information search how to create controls at runtime. hope it helps :-\
dhaim programming is a hobby that make some money as side effect :)
Where to find example for this ? Every menu item Tag property contains unique name. List of selected toolbar buttons should be stored in user settings or in isolated storage. Probably in form load some code should create this toolbar by retrieving text from menu and setting button onclick method to execute PerformClick for forresponding menu item.
Andrus