Hi Kevin,
You have a couple of options:
1) Make the base event handler protected virtual. That way you can override it in the sub-class rather than create another event handler in the sub-class.
-or-
2) Don't create an eventhandler and simply override the OnResize method in both the base and the sub-class.
Either way is acceptable.
~~Bonnie
>I have a panel called pnlBase. It has a few controls on it. In the Resize event I have:
>
>
>private void pnlBase_Resize(object sender, EventArgs e)
>{
> lblCurrentUserName.Left = Width - lblCurrentUserName.Width - 20;
>
> cmdNext.Top = Height - cmdNext.Height - 10;
> cmdNext.Left = Width - cmdNext.Width - 25;
>
> cmdPrevious.Top = cmdNext.Top;
> cmdPrevious.Left = cmdNext.Left - cmdNext.Width - 10;
>}
>
>
>I then subclassed the panel into pnlQuery. In it's resize I have:
>
>
>private void pnlQuery_Resize(object sender, EventArgs e)
>{
> if (txtQuantities != null)
> {
> txtQuantities.Left = Width - txtQuantities.Width - 15;
> txtSearchWords.Left = Width - txtQuantities.Width - 5;
>
> txtSearchWords.Height = Height - cmdNext.Top - 5;
> txtQuantities.Top = txtSearchWords.Top;
> }
>}
>
>
>When I run it it jumps back & forthe between the 2 events, and the controls don't end up where I want them. What's the right way to
>do this?