471,627 Members | 1,356 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

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

An array of panels for a configuration window

Hi all again,

My application has a configuration window that is currently using a
tabcontrol to separate the different logical aspects of configuring it.
That is all well and fine, but I am soon going to have enough pages that
this will look really crowded. I decided that the most elegant solution
would be to go for a treeview where you select the category, and then
the right side of the window will display a panel that contains the
related configuration options.

Currently, we're talking about 5-10 pages of configuration settings, and
it might expand to 15-20 in the near future. What I thought of doing was
to have an array of settings, something like this in psuedo-code:

(A ConfigPage contains the Path (from the treeview), a display string
for the top right part of the window, and the panel to be displayed when
the Path node is the current one).

ConfigPage[] ConfigPages =
{
{"MyApp", "MyApp Configuration Settings", pConfigIntro},
{"MyApp\Data", "MyApp Data Settings", pDataPage},
{"MyApp\GUI", "Graphical stuff", pGUIPage}
}

You probably understand what I mean.

What I am wondering - is this the "correct" way to do it? Is there a
more elegant way? Does anyone have any experience from implementing
something like this, or any tips'n'tricks for how to make it user
friendly and painless for the developer (me) at the same time?

Also, where should I define this array for C# to not hate me? After the
VS2003-generated InitializeComponent() function perhaps?

Thanks for any input!

Rune
Jan 8 '06 #1
1 2178
Is the crowding due to the tabs being visible?

Keep the TabControl, but use a custom one in which you can hide the tabs.
Then just use your Treeview to set the tabcontrols selectedindex.

For the modifications needed to TabControl see the example on my site titled
"Add a HideTabs property to turn on/off the Tabs"
http://www.dotnetrix.co.uk/tabcontrols.html

You could even modify the example to give you a Title Area at the top, after
first having set Alignment to bottom.

--
Mick Doherty
http://dotnetrix.co.uk/nothing.html
"Rune Jacobsen" <rune.jacobsen@no_spam.broadpark.no> wrote in message
news:43********@news.broadpark.no...
Hi all again,

My application has a configuration window that is currently using a
tabcontrol to separate the different logical aspects of configuring it.
That is all well and fine, but I am soon going to have enough pages that
this will look really crowded. I decided that the most elegant solution
would be to go for a treeview where you select the category, and then the
right side of the window will display a panel that contains the related
configuration options.

Currently, we're talking about 5-10 pages of configuration settings, and
it might expand to 15-20 in the near future. What I thought of doing was
to have an array of settings, something like this in psuedo-code:

(A ConfigPage contains the Path (from the treeview), a display string for
the top right part of the window, and the panel to be displayed when the
Path node is the current one).

ConfigPage[] ConfigPages =
{
{"MyApp", "MyApp Configuration Settings", pConfigIntro},
{"MyApp\Data", "MyApp Data Settings", pDataPage},
{"MyApp\GUI", "Graphical stuff", pGUIPage}
}

You probably understand what I mean.

What I am wondering - is this the "correct" way to do it? Is there a more
elegant way? Does anyone have any experience from implementing something
like this, or any tips'n'tricks for how to make it user friendly and
painless for the developer (me) at the same time?

Also, where should I define this array for C# to not hate me? After the
VS2003-generated InitializeComponent() function perhaps?

Thanks for any input!

Rune

Jan 8 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Edmond Ho | last post: by
reply views Thread by Bruce E. Stemplewski | last post: by
5 posts views Thread by Robert Oschler | last post: by
1 post views Thread by pfnus | last post: by
1 post views Thread by Timo | last post: by
reply views Thread by leo001 | last post: by

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.