Dodsworth
asked on
Circle Class
I need to write a class that presents graphically as a circle.
My first stumbling block is that the Ellipse class is NotInheritable.
How should I proceed ?
My first stumbling block is that the Ellipse class is NotInheritable.
How should I proceed ?
Just create a class which uses Ellipse class to draw itself?
ASKER
Hmm.. I've been pondering your suggestion for a week now.
My Circle class is uses most of the properties and methods of the ellipse class but I need to link in additional data (createddate, updateddate, owner, etc)
In previous projects I'd inherit a button, as it has all the properties and events that I need, but this requirement is all about circles. Why can't I inherit an ellipse anyway ?
I'm tempted to write some bad code and parse the additional properties out of .tag !
Any ideas on a less dirty approach ?
My Circle class is uses most of the properties and methods of the ellipse class but I need to link in additional data (createddate, updateddate, owner, etc)
In previous projects I'd inherit a button, as it has all the properties and events that I need, but this requirement is all about circles. Why can't I inherit an ellipse anyway ?
I'm tempted to write some bad code and parse the additional properties out of .tag !
Any ideas on a less dirty approach ?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I've only ever parsed out strings from a .tag but just noticed..
Public Property Tag As Object
Could I write a class for my additional properties and some how place a pointer to an instance of the class in the .tag property ?
Public Property Tag As Object
Could I write a class for my additional properties and some how place a pointer to an instance of the class in the .tag property ?
Yes you can.
ASKER
But then I'd have to cast it to get at the properties right?
Yes because it would be stored as type object.