473,396 Members | 1,847 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Hierarchical Component Editor

Hi,
When you use the Datagrid, editing TableStyles, you can add ColumnStyles using the design time editor. On the ColumnStyle design time editor, there is a Add button where there is a drop arrow where you can choose between a DataGridBoolColumn and DataGridTextBoxColumn to add.

I wish to have the same exact dialog for my components with the difference that I would like to list in that drop arrow my own types.

Actually I have a component called MyMenuSystem where I would like to add, at design time, child MyMenuSystemTextItem and MyMenuSystemButtonItem... the same way you can add DataGridBoolColumn and DataGridTextBoxColumn to a DataGridColumnStyleCollection.

How can I do this? Is it just a mather of putting some attributes to my class to have the default collection design time editor to adapt to multiple types or I must redo a complete design time control??

JPRoot

Nov 15 '05 #1
3 1647

Hi jproot

I will do some research on this issue, I will reply to you ASAP.

Thanks for your understanding.

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Nov 15 '05 #2

Hi JPRoot,

Thank you for posting in the community! Sorry for letting you wait for so
long time.

Based on my understanding, you want to add more types to your collection
property's "Add" button.(Appear as a menu button in the editor form)

================================================== ========
Actually, in .Net designer, CollectionEditor class is used to edit the
collection property. To add more types to your member "Add" button, you can
inherit CollectionEditor class and override CreateNewItemTypes() method to
return your customized types.

You can try the following Solution to see if it helps resolve your issue:

private object [] col;

[Editor(typeof(MyCollectionEditor),typeof(System.Dr awing.Design.UITypeEditor
))]
public object[] Col
{
get
{
return col;
}
set
{
col=value;
}
}

public class MyCollectionEditor :
System.ComponentModel.Design.CollectionEditor
{
public MyCollectionEditor(Type t): base(t)
{
}

protected override Type[] CreateNewItemTypes()
{
return new Type[] {typeof(MyItem), typeof(MyOtherItem) };
}
}

class MyItem
{
}

class MyOtherItem
{
}

================================================== =======
Please apply my suggestion above and let me know if it helps resolve your
problem.

Thank you for your patience and cooperation. If you have any questions or
concerns, please feel free to post it in the group. I am standing by to be
of assistance.
Have a nice day!!

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Nov 15 '05 #3

Hi JPRoot,

Is your problem resolved?
If you still have anything unclear, please feel free to tell me, I will
help you.

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Nov 15 '05 #4

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

Similar topics

5
by: skol | last post by:
Is there any HTML WYSIWYG editor component available for Python/wxPython? Thanks.
2
by: brazilnut52 | last post by:
I am going to outline the steps I go through to produce the problem. Hopefully this will help you understand the problem better I have created a simple COM DLL in .NET by using the COM class...
0
by: JPRoot | last post by:
Hi, When you use the Datagrid, editing TableStyles, you can add ColumnStyles using the design time editor. On the ColumnStyle design time editor, there is a Add button where there is a drop arrow...
0
by: Björn Bengtsson | last post by:
Hello! I have an urgent problem concerning ASP.NET, ADO.NET, SQL Server, XML and the TreeView control. I have two tables; one describing the products and one describing their relationships. A...
0
by: Ken Dopierala Jr. | last post by:
Hi, When I change properties through the property window on my custom control and then move focus from that property cell VS.Net runs the GetDesignTimeHtml() method on my designer. When I...
2
by: AMDRIT | last post by:
Hello everyone, I have created a custom component and one of its properties is a class object with it's own properties. During runtime, I can assign values to the class object properties just...
122
by: Edward Diener No Spam | last post by:
The definition of a component model I use below is a class which allows properties, methods, and events in a structured way which can be recognized, usually through some form of introspection...
7
by: Joe | last post by:
Is it possible to have a component which is global to the entire application? I need to have a single component act sort of like a server which components in any of the forms can access. For...
0
by: Matrix | last post by:
Hi, I am trying use HTML Editor (a wrapper on MSHTML COM component) is there any way I can implement a spell check in this component I want it should support all facilities available with word...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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...
0
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,...

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.