overriding the Size property in Control?

O

ORC

How do I override the Size property in a user made Control (e.g.: public
void Graph : Control). I'll need to set gridsize etc. that is dependent of
the control size and therefore I thought that I would set these properties
in the overriden Size property., but I get an error message when trying
this:
public override Size Size
{
set
{
some code...
base.Size = value;
}
}

The compilers error message: Cannot access modifiers when overriding public
inherited member....

Any help is highly appreciated.

Thanks
Ole
 
O

ORC

Oh sorry - I forgot to tell that I'm writing an application for the Compact
Framework and it doesn't support 'OnSizeChanged' so my question is still
very relevant.

Thanks
Ole
 

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