Nested Properties URGENT!!!

  • Thread starter Thread starter Christopher Calhoun
  • Start date Start date
C

Christopher Calhoun

Does anyone know how to create nested properties like.

You declare Property A. Now you want to declare a nested property AB. Which
in the desgner for example would show up with Property A having a Plus sign
next to it exposing Property AB,AC,AD etc.


Thanks in Advance...
 
Christopher,

create a Class, which than is the return type of that first level property.
All the public properties of that class are the second level property:

public Class FirstLevel
public Property SecondLevel
...
end Property
end class


public Class Master
public Property FirstLevel
...
end property
end class

If you have an instance of Class Master, you access the Properties of
Property FirstLevel like

instanceOfMaster.FirstLevel.SecondLeve=SomeThing

Just typed everything in Outlook Express, hope I didn't make any embarrising
mistakes...

Klaus
 
Of course, I did...Try this:

Klaus Löffelmann said:
Christopher,

create a Class, which than is the return type of that first level property.
All the public properties of that class are the second level property:
public Class FirstLevel
public Property SecondLevel as OtherType
...
end Property
end class


public Class Master
public Property FirstLevel as FirstLevel
...
end property
end class
 
* "Christopher Calhoun said:
Does anyone know how to create nested properties like.

You declare Property A. Now you want to declare a nested property AB. Which
in the desgner for example would show up with Property A having a Plus sign
next to it exposing Property AB,AC,AD etc.

Did you try to declare the property as a structure?
 
Your solution worked execpt I need designer support
My Master class inheirits from the datagrid base class so all of the
properties I declare in the master class show up in the designer. When I add
another class to the project which ever properties I declare there are
accessible programmatically but not from the designer.

Any Ideas???
 
Will a struct work for what I am trying to accomplish?
If so do have any samples to share.

Thanks in advance.
 
Back
Top