change location of control

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi all,
I have a form that inherits from another form.
I want to change the location of a specific control. For this I have a
method in the base form which does only this:
public virtual void SetLocation(int x, int y)
{
myControl.Location = new Point(x, y);
}
I call this method from the inheriting form, like this: base.SetLocation(0,
0);

It doesn't work. The control's location changes but not to (0,0).
When I call this method from inside the base form it does work(changes to
0,0).
It looks like the inheriting form can't touch some certain area.

Can anybody explain to me what may cause this issue, and how to solve it?
Thank you very much
 
The location of the Control is always relative to its container Control.
Could this be the problem?

--
HTH,

Kevin Spencer
Microsoft MVP

DSI PrintManager, Miradyne Component Libraries:
http://www.miradyne.net
 
Thanks Kevin,
yes, I know that, but still don't know what happens here.
when reducing the size of the control, it succeeds.
It's probably something I made wrong with inheritance...
thanks anyway
 
Back
Top