Properties and "sub-Properties" 
Author Message
 Properties and "sub-Properties"

Hi all,
I have created a class named MyClass. This class contains two properties and
I want one of them to provide two "sub-properties" (similar to the way that
the size displays "Width" and "Height"). The best solution that I came with
is to create an array and pass that array.
This is not the "neater" solution so I was thinking if anyone came across
the same problem before and can help me with it.

TIA
Moses



Wed, 16 Jun 2004 12:49:48 GMT  
 Properties and "sub-Properties"
Moses,

I may not understand your problem.

If I do, then you can look at how Width/Height are implemented. They are a
contained structure. Thus you can create a public structure with your sub
properties, and create a property in your class that gets/returns this
structure. Similar to the framework, you can overload properties and methods
to take either the structure or the individual values.

Kathleen


Quote:
> Hi all,
> I have created a class named MyClass. This class contains two properties
and
> I want one of them to provide two "sub-properties" (similar to the way
that
> the size displays "Width" and "Height"). The best solution that I came
with
> is to create an array and pass that array.
> This is not the "neater" solution so I was thinking if anyone came across
> the same problem before and can help me with it.

> TIA
> Moses



Thu, 17 Jun 2004 01:28:42 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. field .Properties("Description") question

2. QueryDef.Type property: "Hidden" queries

3. Accessing "Modified" property

4. Set the Field "Description" Property

5. Updating "Lastupdated" property

6. Programmatically modifying field "description" property

7. CurrentDb.Properties("AllowSpecialKeys") Misbehavior

8. Changing "last saved by" property

9. "Save Sent Message to" property

10. Export to HTML "HTMLExportData" property

11. Returning "Text" custom properties

12. Word's "EnableEvents property"?

 

 
Powered by phpBB® Forum Software