Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Subclass Event Calls
Message
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Title:
Subclass Event Calls
Miscellaneous
Thread ID:
01457639
Message ID:
01457639
Views:
78
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?
Everything makes sense in someone's mind
public class SystemCrasher :ICrashable
In addition, an integer field is not for irrational people
Next
Reply
Map
View

Click here to load this message in the networking platform