473,320 Members | 1,719 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

How best to create a complex interface

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
Dec 13 '07 #1
3 1997


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

Dec 13 '07 #2
This may save you a lot of time and point you in the right direction:

http://www.codeproject.com/KB/miscct...&select=947349



"Malenfant" <ca*************@gmail.comwrote in message
news:4a**********************************@e25g2000 prg.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

Dec 13 '07 #3
On Thu, 13 Dec 2007 05:21:23 -0800 (PST), Malenfant
<ca*************@gmail.comwrote:
>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
Dec 13 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

48
by: Bulba! | last post by:
I'll soon start development of a specialized small app and need to choose GUI for it. I have narrowed the choice to wxPython/PythonCard and QT/PyQT (buying commercial licenses is not a big...
16
by: D Witherspoon | last post by:
I am developing a Windows Forms application in VB.NET that will use .NET remoting to access the data tier classes. A very simple way I have come up with is by creating typed (.xsd) datasets. For...
136
by: Matt Kruse | last post by:
http://www.JavascriptToolbox.com/bestpractices/ I started writing this up as a guide for some people who were looking for general tips on how to do things the 'right way' with Javascript. Their...
4
by: David Pinx | last post by:
Greetings, I will be developing an application that will have two versions, a web application to be deployed at the client side and a windows application. The question is, what would be the...
8
by: Support | last post by:
Hello: I am deploying a new web site that will have over 100 pages. In the ASP world, I would create templtes - include files, etc... to easily "manage" the site. In asp.net 2.0 I want to create...
4
by: Tarun Mistry | last post by:
Hi all, I have posted this in both the c# and asp.net groups as it applies to both (apologies if it breaks some group rules). I am making a web app in asp.net using c#. This is the first fully OO...
2
by: Steve Le Monnier | last post by:
Can anybody give me a quick heads up on the best way to develop C# based DLL's that are called via VBA. I'm developing a pop-up window that will record information within SQL. I need to launch...
4
by: =?Utf-8?B?bW9mbGFoZXJ0eQ==?= | last post by:
In VB6, we created a number of ActiveX DLLs that all shared a similar interface. The main application would load these in dynamically (late-bound.) This worked well for our situation because we...
2
by: =?Utf-8?B?RWl0YW4=?= | last post by:
Hello, Suppose I have created 2 objects of MyClass: MyClass myClass1 = new MyClass(); MyClass myClass2 = new MyClass(); I also defined variables inside MyClass1: myClass1.myVar1 = 1 ;
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.