Creating Settings form using TreeView in C#
Posted
by
Kiran Chandrashekhar
on Stack Overflow
See other posts from Stack Overflow
or by Kiran Chandrashekhar
Published on 2012-11-11T04:26:54Z
Indexed on
2012/11/11
5:00 UTC
Read the original article
Hit count: 198
I am developing the settings form for the software developed in C#. I was looking at how different software have implemented their settings form.
In most of the cases that I came across, they seem to be using Treeview on the left pane of the form and configuration settings on the right pane.
Ref URL : http://2.bp.blogspot.com/-nMfQoLurxwM/UDXfiZKd4DI/AAAAAAAAAME/IRf6kmxay4w/s1600/bild1.jpg
I was wondering, how the different controls are designed/displayed on the right pane. Do they hide all the controls depending which node is selected in the TreeView
something like this :
if (treeView1.SelectedNode == treeView1.Nodes[0])
{
this.groupBox1.Visible = true;
this.button1.Visible = true;
this.textBox1.Visible = true;
this.textBox2.Visible = true;
this.label1.Visible = true;
this.label2.Visible = true;
this.label3.Visible = true;
}
else
{
this.groupBox1.Visible = false;
this.button1.Visible = false;
this.textBox1.Visible = false;
this.textBox2.Visible = false;
this.label1.Visible = false;
this.label2.Visible = false;
this.label3.Visible = false;
this.groupBox2.Visible = true;
this.button2.Visible = true;
this.textBox3.Visible = true;
this.textBox3.Visible = true;
this.labe4.Visible = true;
this.label5.Visible = true;
this.label6.Visible = true;
// bool success = selectColor();
}
Is my understanding correct ? Or do we have a better design approach for creating a settings form.
Thanks
© Stack Overflow or respective owner