Groups | Blog | Home
all groups > c# > june 2004 >

c# : Building an VS.net-style Options dialog?



Vijaye Raji
6/1/2004 5:22:49 PM
The left side control is actually a Treeview control.

You can build a template form that is used to construct the right side
content of the options dialog. Let's call them pageForms.

You design a bunch of pageForms, instantiate them and for every pageForm,
create a tree node and add it to the tree view, after setting its "Tag"
property to the instance of the pageForm.

This way, you can sign up for the AfterSelect event and change the hosted
form on the right side (be sure to set the pageForm's TopLevel property to
false, and border to None.

Alternately, you can experiment using UserControl for this (the benefit is
the Tab key handling comes for free).

HTH

-vJ

[quoted text, click to view]

Vijaye Raji
6/1/2004 9:25:51 PM
Not that I know of. Since both Form and UserControl derive from the same
base class, you should be able to switch between them (in code) fairly
easily.

Good Luck.

-vJ

[quoted text, click to view]

Colin Cashman
6/1/2004 11:25:42 PM
What's the best way to build a dialog where a listbox on the left side
of the dialog determines which set of controls to display on the right
Colin Cashman
6/2/2004 3:58:05 AM
[quoted text, click to view]

Are there any downsides to building a UserControl for each "pageForm"
Colin Cashman
6/2/2004 2:25:09 PM
[quoted text, click to view]

AddThis Social Bookmark Button