Expandable Properties

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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.
 
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.designtime.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top