PC Review


Reply
Thread Tools Rating: Thread Rating: 1 votes, 5.00 average.

VS.Net Property Collection Editor

 
 
Friskusen
Guest
Posts: n/a
 
      17th Jan 2005
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.





















 
Reply With Quote
 
 
 
 
Ken Tucker [MVP]
Guest
Posts: n/a
 
      17th Jan 2005
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" <(E-Mail Removed)> wrote in message
news:ZLEGd.4771$(E-Mail Removed)...
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.






















 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Collection problems (create Collection object, add data to collection, bind collection to datagrid) Řyvind Isaksen Microsoft ASP .NET 1 18th May 2007 10:24 AM
Collection problems (create Collection object, add data to collection, bind collection to datagrid) Řyvind Isaksen Microsoft Dot NET 1 18th May 2007 10:24 AM
Can't get collection to save when using collection of custom class as property of control in VS 2005 J.Edwards Microsoft Dot NET Compact Framework 0 10th Jan 2006 05:44 AM
How to build a Property Editor? (collection) Dexter Microsoft ASP .NET 0 30th Nov 2004 11:00 PM
Item Collection Editor doesn't preserve collection Andrés Giraldo Microsoft ASP .NET 2 25th Mar 2004 09:38 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:28 AM.