473,320 Members | 1,872 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.

Settings Dialog

I'm fairly new to winforms and I'm having a hard time creating a
settings dialog. I'd like to have a list on the left side of the
dialog and show a different set of controls on the left based on what
is selected in the list. Kinda like this, if you're having a hard time
visualizing it:

http://img85.imageshack.us/my.php?image=settings7no.gif

I'm not sure what would be the best way to handle the right side of the
screen and I can't even come up with the proper terms to search with in
Google. My first thought would be to do a tabbed container with one
tab for each option in the list and then hide the tabs. The only
problem with that is I can't figure out how to hide the tabs.

Is this the best way to handle something like this? If not, any
suggestions on a better way to do it? If so, how do I go about hiding
the tabs. Thanks.

--
Jason

Jul 4 '06 #1
5 3258
jd*****@gmail.com wrote:
I'm fairly new to winforms and I'm having a hard time creating a
settings dialog. I'd like to have a list on the left side of the
dialog and show a different set of controls on the left based on what
is selected in the list. Kinda like this, if you're having a hard time
visualizing it:

http://img85.imageshack.us/my.php?image=settings7no.gif

I'm not sure what would be the best way to handle the right side of the
screen and I can't even come up with the proper terms to search with in
Google. My first thought would be to do a tabbed container with one
tab for each option in the list and then hide the tabs. The only
problem with that is I can't figure out how to hide the tabs.

Is this the best way to handle something like this? If not, any
suggestions on a better way to do it? If so, how do I go about hiding
the tabs. Thanks.
Try putting the different controls into a groupbox or panel control and
then hiding/showing different panels depending on what is selected in
the grid.

HTH
JB
Jul 4 '06 #2
John B wrote:
Try putting the different controls into a groupbox or panel control and
then hiding/showing different panels depending on what is selected in
the grid.
Is there any way that I can design the different forms in different
places instead of trying to design them on top of each other? It gets
confusing trying to edit all the different forms when they're all
stacked.

Jul 4 '06 #3
jd*****@gmail.com wrote:
John B wrote:
>Try putting the different controls into a groupbox or panel control and
then hiding/showing different panels depending on what is selected in
the grid.

Is there any way that I can design the different forms in different
places instead of trying to design them on top of each other? It gets
confusing trying to edit all the different forms when they're all
stacked.
You could create usercontrols and then use the usercontrols instead of
the panel/groupbox's.
I would not really recommend this though as it sounds like more work
than its worth.
You know you can bring to front and send to back as necessary.

JB
Jul 4 '06 #4
jd*****@gmail.com wrote:
John B wrote:
>Try putting the different controls into a groupbox or panel control and
then hiding/showing different panels depending on what is selected in
the grid.

Is there any way that I can design the different forms in different
places instead of trying to design them on top of each other? It gets
confusing trying to edit all the different forms when they're all
stacked.
Hi Guys,

You can design each panel in a seperate form, if you want, then do a bit o'
trickery to get the form to appear within the settings dialog. Let's
assume in your settings dialog, you have a panel control
called 'viewPanel'.

///
private Form _currentView;
public void SetView ( Form newView )
{
if ( _currentView != null )
{
viewPanel.Controls.Remove( _currentView );

_currentView.Close();
_currentView.Dispose();
}

_currentView = newView;

if ( newView == null )
return;

_currentView.TopLevel = false;
_currentView.Location = new Point( 0, 0 );
_currentView.Size = viewPanel.Size;
_currentView.FormBorderStyle = FormBorderStyle.None;
viewPanel.Controls.Add( _currentView );
_currentView.Visible = true;
}
///

Now, when you need to change the view, just call SetView(...) passing an
instance to a form, that is the view for that particular section.

Note: this probably isn't an optimal solution, but it's a start. It could
totally be optimised by caching and initialising the views beforehand, and
simply selecting them from a dictionary when required... but you get the
idea.

--
Hope this helps,
Tom Spink
Jul 4 '06 #5
Design each set of controls on a separate UserControl and then show/hide (or
add/remove) these as necessary in your settings dialog.

/claes

<jd*****@gmail.comwrote in message
news:11**********************@p79g2000cwp.googlegr oups.com...
I'm fairly new to winforms and I'm having a hard time creating a
settings dialog. I'd like to have a list on the left side of the
dialog and show a different set of controls on the left based on what
is selected in the list. Kinda like this, if you're having a hard time
visualizing it:

http://img85.imageshack.us/my.php?image=settings7no.gif

I'm not sure what would be the best way to handle the right side of the
screen and I can't even come up with the proper terms to search with in
Google. My first thought would be to do a tabbed container with one
tab for each option in the list and then hide the tabs. The only
problem with that is I can't figure out how to hide the tabs.

Is this the best way to handle something like this? If not, any
suggestions on a better way to do it? If so, how do I go about hiding
the tabs. Thanks.

--
Jason

Jul 5 '06 #6

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

Similar topics

1
by: Anthony Nystrom | last post by:
I need to within code control some printer settings before raising the print dialog... I need to set some properties for the printer such as "The Printer to Print too", Page settings such as paper...
3
by: Nice Chap | last post by:
Is there any class to Display the *Printer* Settings dialog in .net at all ? I could find Page Settings and other related dialogs but no Printer Settings Dialog. Please...
1
by: Tim Mulholland | last post by:
I am setting up all my settings using the built-in settings stuff in Visual Studio (though using my own provider to change the storage location/type for the settings). All goes well until i try...
3
by: UltimateNickFury | last post by:
Hello, I am trying to display the "Printer Settings" dialogue in vb.net. I have found the code for performing this in VB6 but am wondering how this is done in vb.net. Thanks.
1
by: Bob Altman | last post by:
How do I bind a value from My.Settings to a property on a control on a Windows form? I've created a setting called My.Settings.Value1 of type String. Now I want to create a "Settings" dialog...
0
by: AndyPC | last post by:
I'm currently developing this Class Library as a Plug-in, which has to maintain it's own mail list for the host application to receive. The Class library has a dialog in it (opened by the host app...
13
by: Dave | last post by:
When using the properties designer to store application wide properties how do you get this to work across a project group containing an EXE and a collection of DLLs. I'm using C#.Net 2005. I...
0
by: Calum | last post by:
I have created a custom print dialog and its fully working expcept for the printer preferences. The code below displays the printer preferences dialog for the selected printer fine, the devmode...
0
by: CSharpner | last post by:
How can I do the following?: Have a label on a form have its Text property bound to a setting from one of my DLL library's config files? I've followed these instructions to successfully get...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
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: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
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...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
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...

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.