I'm currently working on my first relatively complex C# application
and I've run into some problems as to the best way to develop the
interface. The design spec calls for a treeview on the left-hand side
which brings up the relevant interface when the node is clicked on. I
made some initial headway by storing the interface information in
separate forms and then loading the controls onto the main form like
this:
this.blankPanel.Controls.Clear();
if (e.Node.Text == "Billing Runs")
{
billingRunMain billingrunForm = new billingRunMain();
foreach (Control c in billingrunForm.Controls)
this.blankPanel.Controls.Add(c);
billingrunForm.Dispose();
}
This worked fairly well but I've run into some major limitations,
mainly that accessing those controls once they have been added is
seemingly impossible. I can configure them before putting them on the
main form but I've now run into my first control that needs to be
updated after been loaded onto the form.
I've tried Panels and Tab controls but both have problems. The panels
are seemingly impossible to maintain as each panel must be stacked on
top of each other in the IDE. The tab control is also problematic, as
I can't find a way to hide the tabs or ensure that the user can't
switch to the wrong tab.
I'm sure there must be another solution I'm missing here and any help
would be greatly appreciated.
Regards,
Steve Green