473,669 Members | 2,414 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

VS.Net Property Collection Editor

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.







Nov 21 '05 #1
1 3850
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" <fr******@yahoo .no> wrote in message
news:ZL******** **********@news 2.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 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.








Nov 21 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
2008
by: Balamurukan | last post by:
How to retrive property values from our own property window
3
4312
by: Shimon Sim | last post by:
I have control. One of the properties is implemented as StringCollection. I didn't use any Editor attribute for it. During Design time system shows dialog similar to Items in DropDownList but Add button throws an error "Constructor on type System.String not found.". I may understand this message - there are too many contractor and non of them takes string. But how can I fix the problem or may be use the editor similar to Font.Names...
3
1387
by: JES | last post by:
Hello, I'm trying to work through "Teach Yourself More Visual Basic .NET in 21 Days" and have come across something that I can't figure out. An example in the book for creating toolbars and setting toolbar button properties shows that the toolbar button has a "itemdata" property. This property does not show up in my toolbarbutton collection editor and I can't seem to find any info in the help for this particular property. Does this...
6
1865
by: Altman | last post by:
I would like to use an indexed property to access my private array of user controls. If I don't use an indexed property, the property will show up in my Properties Window during development. Is there a way to get this to show up in the properties window?
0
1095
by: --== Alain ==-- | last post by:
Hi, I would like to re-create the same behavior as we can find on ListView control property when you want to add a new column. Basically, i need : 1. to create a published property which will allow user (by clicking on it) to open a property form where user can add new column data. 2. this property should be a collection (to allow not only 1 column but several).
2
6758
by: jbaldi | last post by:
I am trying to use a collection editor to edit multiple types as in the following example: http://windowsforms.com/blogs/faqs/archive/2006/05/26/how-do-i-allow-a-user-to-add-more-than-one-type-of-object-to-a-collection-at-design-time.aspx The problem I am having is with the property grid. I can add multiple types to my collection editor but in the property grid isn't showing any properties for the members that I have added to the...
2
12498
by: ME | last post by:
I have a property that is a generic list of type IAddress (List<IAddress>). When I attempt to view this property using the Property Grid control it plainly says "Collection" and offers the typical generic CollectionEditor that ships with .NET to edit the property. The trouble comes up though when I attempt to Add an item to the collection via the CollectionEditor. Obviously the Collection editor can not create an IAddress object since it...
2
4221
by: R.A.F. | last post by:
Hi, I have a custom control in which i have a collection property named "Columns". this collection property add/remove column objects. in my Column class i have a property named Alignment which use a custom property editor. when this property editor is not linked to this property,
2
7821
by: michelqa | last post by:
Hi, I'm trying to display a list of string in the string collection editor just like the "items" property of an ListBox in VS IDE.... I can find many examples on the net but I cant find any example like items property of a listbox... I mean the String collection editor with the text "Enter the strings in the collection (on per line)" Is anybody can point me to the right object to use to define my string
0
8465
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8383
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8894
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8587
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8658
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7407
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4206
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2792
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2029
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.