PropertyGrid & member variable class instances

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

Guest

I have a class which contains an instance of another class:

class A {
private classB theB;

public classB InnerMember
{
get { return theB;}
set { theB = value;}
}
}

I'd like to have the contained class's public members accessible/updateable
through the propertygrid component - how is this possible, ideally I'd like
it to look the "font" member of many controls with a "+" sign that clicking
on it would show the members of the class, but what I get is something like:
InnerMember | MyApp.InnerMember (grayed out)
 
Here's a link to two articles that I'm sure will help you.

http://www.codeproject.com/cs/miscctrl/customizingcollectiondata.asp
http://www.codeproject.com/cs/miscctrl/bending_property.asp

Terry

I have a class which contains an instance of another class:

class A {
private classB theB;

public classB InnerMember
{
get { return theB;}
set { theB = value;}
}
}

I'd like to have the contained class's public members accessible/updateable
through the propertygrid component - how is this possible, ideally I'd like
it to look the "font" member of many controls with a "+" sign that clicking
 
Back
Top