Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
User Control Design Question
Message
General information
Forum:
ASP.NET
Category:
Class design
Title:
User Control Design Question
Miscellaneous
Thread ID:
01397034
Message ID:
01397034
Views:
96
I am creating an application that will have multiple "panes". When an option is selected, the panel for that option will be placed on the form.

What's the best way for me to design a hierarchy of user controls all based off a single base control? I would really prefer to do it visually. If I do it in code, I can base each one off of a base class, but doing everything in code is tedious and painstaking.

If I design the panes visually, I don't have the inheritance I want. If Implement an interface, I'm assured of getting all the members needed, but then I lose other members I need on the panel:
private void AddPane()
{
    IPanel oControl;

    switch (sItemKey)
    { 
        case "ship_items":
            oControl = new crlShipItems();
            break;

        case "sview_inv":
            break;

        case "sreports":
            break;

    }

    this.Controls.Add(oControl);
    oControl.Top = iTop;
    oControl.Left = iLeft;
    oControl.Setup();
}
This doesn't compile because there is no Top or Left in the interface.

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