Solved

Circle Class

Posted on 2013-11-06
7
189 Views
Last Modified: 2013-11-13
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 ?
0
Comment
Question by:Dodsworth
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
7 Comments
 
LVL 83

Expert Comment

by:CodeCruiser
ID: 39628092
Just create a class which uses Ellipse class to draw itself?
0
 
LVL 1

Author Comment

by:Dodsworth
ID: 39639353
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 ?
0
 
LVL 83

Accepted Solution

by:
CodeCruiser earned 500 total points
ID: 39639945
Yeah given the problem that ellipse is not inheritable for some reason, the two options are to create a class which uses ellipse to render itself or use the ellipse class itself and store the additional information in tag property.
0
Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

 
LVL 1

Author Comment

by:Dodsworth
ID: 39641285
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 ?
0
 
LVL 83

Expert Comment

by:CodeCruiser
ID: 39642981
Yes you can.
0
 
LVL 1

Author Comment

by:Dodsworth
ID: 39643957
But then I'd have to cast it to get at the properties right?
0
 
LVL 83

Expert Comment

by:CodeCruiser
ID: 39646270
Yes because it would be stored as type object.
0

Featured Post

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This tutorial demonstrates one way to create an application that runs without any Forms but still has a GUI presence via an Icon in the System Tray. The magic lies in Inheriting from the ApplicationContext Class and passing that to Application.Ru…
1.0 - Introduction Converting Visual Basic 6.0 (VB6) to Visual Basic 2008+ (VB.NET). If ever there was a subject full of murkiness and bad decisions, it is this one!   The first problem seems to be that people considering this task of converting…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…

632 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question