Connecting Tech Pros Worldwide Help | Site Map

VS.Net Property Collection Editor

Friskusen
Guest
 
Posts: n/a
#1: Nov 21 '05
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 ToolbarItemCollection to manage ToolbarItems.
The Toolbar control has a property

Public ReadOnly Property Items() as ToolbarItemCollection

This setup is very similar to the standard ListView control which uses a
ColumnHeaderCollection 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
ToolbarItemCollection, that is:

(Dim ToolbarItem1 as new ToolbarItem....
Toolbar1.Items.AddRange(ToolbarItem1,......)

Anybody ?

Regard, Anders











To add an item manually, i would simply write:

dim ToolbarItem1 as new ToolbarItem
..
..
Toolbar.Items.AddRange(ToolbarItem1,...etc)
..

What i really wish is to add Items at design time in using VS.Net property
collection editor.





















Ken Tucker [MVP]
Guest
 
Posts: n/a
#2: Nov 21 '05

re: VS.Net Property Collection Editor


Hi,

Take a look at the vbPowerPack's utility toolbar control. You can
download the source and see how to create a property editor.

http://msdn.microsoft.com/library/de...bpowerpack.asp

Ken
----------------------------
"Friskusen" <frpeders@yahoo.no> wrote in message
news:ZLEGd.4771$IW4.97330@news2.e.nsc.no...
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 ToolbarItemCollection to manage ToolbarItems.
The Toolbar control has a property

Public ReadOnly Property Items() as ToolbarItemCollection

This setup is very similar to the standard ListView control which uses a
ColumnHeaderCollection 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
ToolbarItemCollection, that is:

(Dim ToolbarItem1 as new ToolbarItem....
Toolbar1.Items.AddRange(ToolbarItem1,......)

Anybody ?

Regard, Anders











To add an item manually, i would simply write:

dim ToolbarItem1 as new ToolbarItem
..
..
Toolbar.Items.AddRange(ToolbarItem1,...etc)
..

What i really wish is to add Items at design time in using VS.Net property
collection editor.






















Closed Thread