overriding the Size property in Control?

  • Thread starter Thread starter ORC
  • Start date Start date
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
 
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
 
Back
Top