How to derive from a label?

  • Thread starter Richard Lewis Haggard
  • Start date
R

Richard Lewis Haggard

I'm trying to derive a class from the Label class and things are not going
quite right.

I derived the class by doing the obvious:

public class LabelGrid : Label

But I don't seem to be able to get the 2005 editor to provide method over
rides for events such as OnPaintBackground, etc. If I manually enter in the
appropriate wording then the over ride works, but it would seem like the IDE
should provide some sort of automatic means of over riding a member function
from the base class. What does one have to do in order to get the IDE to
over ride a base class function?
 
M

Marc Gravell

Using 2005; If I create a class LabelGrid : Label and type "override"
(and press space), then the IDE immediately displays ~160 methods for
me to override via intellisense. If I select one and press Select tab
then it stubs it out for me, so I think all is well. Are you perhaps
looking in the designer (events panel)? Note that overrides are not
events.

Marc
 
R

Richard Lewis Haggard

Ah! So THAT's the secret! I was sure that there was some easier way of
getting the over ride in place but couldn't find it on my own. I bet there's
documentation on all of these things somewhere but that's something else
I've yet to find. Thanks for the tip.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top