I have (almost) added a simple Toolbar custom control to my control library.
The Items on the toolbar are implemented in a class named ToolbarItem.
I also use a class ToolbarItemColl ection to manage ToolbarItems.
The Toolbar control has a property
Public ReadOnly Property Items() as ToolbarItemColl ection
This setup is very similar to the standard ListView control which uses a
ColumnHeaderCol lection to manage ColumnHeaders.
When clicking the Items property in VS property window i get the
property collection editor with all the ToolbarItem properties, but when
i close the property editor and look inside the source, the Items property
is
just set to Nothing.
I would like VS to initialize the ToolbarItems and add them to the
ToolbarItemColl ection, that is:
(Dim ToolbarItem1 as new ToolbarItem....
Toolbar1.Items. AddRange(Toolba rItem1,......)
Anybody ?
Regard, Anders
To add an item manually, i would simply write:
dim ToolbarItem1 as new ToolbarItem
..
..
Toolbar.Items.A ddRange(Toolbar Item1,...etc)
..
What i really wish is to add Items at design time in using VS.Net property
collection editor.