473,382 Members | 1,421 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,382 software developers and data experts.

Expandable Properties

How can I create a class property such as the 'DockPadding' one from the
UserControl class? What I mean is a property which can be expanded and have
its own properties modified.

In the design view, the DockPadding property looks like this when expanded:

DockPadding
.. All
.. Left
.. Top
.. Right
.. Bottom

I'm trying to create a similar style of property for storing the colour
scheme of a 'table' user control I'm developing, which may look something
like this:

Colours
.. CellBorder
.. CellBackground

What I've tried is creating a class storing the colour values and having
this as a public property of the Table class, but this won't allow me to
modify the colour values at design time as you can with the DockPadding
property.
Nov 17 '05 #1
2 1910
I think that you need to look into Visual Studio design time stuff. You
will need to build some attributes and methods into your class telling
Visual Studio how the user should edit it at design time.

Check out the newsgroup
microsoft.public.dotnet.framework.windowsforms.des igntime.

Nov 17 '05 #2
Take a look at:

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

That linked helped me greatly when creating properties that I needed to
expand.

--
Thanks
Wayne Sepega
Jacksonville, Fl
"When a man sits with a pretty girl for an hour, it seems like a minute. But
let him sit on a hot stove for a minute and it's longer than any hour.
That's relativity." - Albert Einstein

"Bruce Wood" <br*******@canada.com> wrote in message
news:11*********************@f14g2000cwb.googlegro ups.com...
I think that you need to look into Visual Studio design time stuff. You
will need to build some attributes and methods into your class telling
Visual Studio how the user should edit it at design time.

Check out the newsgroup
microsoft.public.dotnet.framework.windowsforms.des igntime.

Nov 17 '05 #3

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

Similar topics

2
by: iainscott | last post by:
Does anyone know how to make a multi-attribute property show in the design time property window of VS IDE in the same way as .Net controls e.g. the Font property has a + sign against it and can be...
4
by: Doug | last post by:
Hi - I'm looking to code some javascript that has an event handler tied to an image ("a down arrow") that will expand code that was hidden on the page load. It's pretty simple, I have an...
0
by: Pradeep | last post by:
Hi all, When i change an expandable property of an object from the property grid, the set method of that property is not being called, where as the set methods of its sub properties are being...
1
by: Smoke | last post by:
Im sure i have asked this about 5 months ago, and someone sent me an interesting article about how to do what i need, but i lost it.. Im developing a custom control and i would need to have nested...
0
by: Brian Young | last post by:
Hi all. I'm using the Property Grid control in a control to manage a windows service we have developed here. The windows service runs a set of other jobs that need to be managed. The control...
0
by: ljlevend | last post by:
I am exposing a property as an expandable property in a PropertyGrid by assigning a System.ComponentModel.TypeConverter attribute to the property. Is there any way to have the PropertyGrid group...
5
by: KitKat | last post by:
I've got two queries; one is a modification of an older query; the other I created from scratch. The old one is about 5 copies down the road from something that has been expandable when I'm in...
1
by: axlq | last post by:
I've seen a lot of examples of expandable/collapsable lists, such as these nice examples: http://www.karlnelson.net/nestedlists/ and http://dynamicdrive.com/dynamicindex1/navigate1.htm They...
1
by: Manil | last post by:
I usually have no problem with Firefox, but here is a rare instance of IE displaying a table with image slices correctly and Firefox adding space where I seemingly have none. Is there anything I can...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

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.