MSDOTnet.org Forum Index
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

How best to create a complex interface

 
Post new topic   Reply to topic    MSDOTnet.org Forum Index -> C Sharp
Author Message
Malenfant



Joined: 13 Dec 2007
Posts: 1

PostPosted: Thu Dec 13, 2007 10:21 am    Post subject: How best to create a complex interface Reply with quote

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

Archived from group: microsoft>public>dotnet>languages>csharp
Back to top
View user's profile Send private message
Family Tree Mike



Joined: 28 Sep 2007
Posts: 17

PostPosted: Thu Dec 13, 2007 11:06 am    Post subject: RE: How best to create a complex interface Reply with quote

"Malenfant" wrote:

> 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
>

It sounds like you should be creating a user control called (perhaps)
BillingRunControl. You create a new instance of that control and add it to
the window.
Back to top
View user's profile Send private message
Rene



Joined: 11 Aug 2007
Posts: 5

PostPosted: Thu Dec 13, 2007 1:31 pm    Post subject: Re: How best to create a complex interface Reply with quote

This may save you a lot of time and point you in the right direction:



http://www.codeproject.com/KB/miscctrl/propertytree.aspx?df=100&forumid=2611&exp=0&select=947349







"Malenfant" wrote in message @e25g2000prg.googlegroups.com...
> 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
Back to top
View user's profile Send private message
bob clegg



Joined: 11 Aug 2007
Posts: 3

PostPosted: Fri Dec 14, 2007 12:25 pm    Post subject: Re: How best to create a complex interface Reply with quote

On Thu, 13 Dec 2007 05:21:23 -0800 (PST), Malenfant
wrote:

>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
Hi Steve,
I don't know whether this is a correct take on your problem but ...
It sounds like your other forms are generating information. You are
then trying to display this information on your master form.

A couple of approaches may work in this scenario.

1) If the generating forms are writing their efforts to a database,
they can raise an event to say that data is ready to be picked up and
your masterform can pick it up from the database.

2) If the data is transitory then I would lean towards passing it to
the master form via events.

Either way the point is pass data only and not windows controls.

When the data arrives you can hang it on the Tag property of a node
and add it to the tree.

regards
Bob

Back to top
View user's profile Send private message
Display posts from previous:   
Related Topics:
Query is too complex error I am updating Access database using I am using the following code: cl in dsN

complex queries from dBase Anybody have any ideas on how to do non-trivial queries using the ODBC dBase driver? Without CASE-WHEN or IF support my next best guess is to import it into a real DBMS and then run queries, but I will *always* get the data in dBase originally, and I'm tr

returning complex structures Hi ! I need a litlle help. A have a type A - some structure. public struct A { public int a, b ; } And another structure - B, which composits of A public struct B { publc int c, d ; public A aa ; } And now, type B is the returning type of my WebMethod. An

How to avoid serializing complex proprty by designer ! Hi I have comlex property (complex means that type of property is a my own object with many properties inside). I have created type coverter and everything work fine except that designer always generates code for this property even if I do not change defa

Cannot Create ProcessStartupInfo for Process.Create Hi I cannot create the for usage in I do not know if it has to be converted from the Class or it has to be created using the I tried both and di
Post new topic   Reply to topic    MSDOTnet.org Forum Index -> C Sharp All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group