Re: IDE Options dialog

Alan Baljeu <[email protected]> Thu, 22 Mar 2007 16:55:28 -0400
Newsgroups gmane.comp.windows.devel.dotnet.cx
Message-ID <075301c76cc4$6c5db9a0$1dc80ac6@CTI>
> -----Original Message-----
> From: Discussion relating to the specifics of the C# and
> Managed C++ languages [mailto:[email protected]]
> On Behalf Of Peter Osucha
> Sent: Thursday, March 22, 2007 4:11 PM
> To: [email protected]
> Subject: [DOTNET-CX] IDE Options dialog
>
> The IDE Options dialog in the VS NET IDE is, I think, a very
> useful, compact dialog for viewing and modifying all kinds of
> information.  I am wondering what your thoughts are on how it
> was created.  I mean, there are hundreds of tree nodes in the
> selection box - all (or most) offering a different form
> section from which to make changes.  Surely, there isn't a
> huge 'Switch' statement and an equally lengthy section of
> blocks to create and located the controls necessary for the
> corresponding tree selection.
>
>
>
> How would you go about making such an extensive dialog if you had to?
>

Each page which appears on the right side, when you select something in the tree, is its own
form.  So you could do something like:
void InitDialog()
{
  CreateNode("keyboard", new KeyboardForm()); // repeat with 100 variations.
}
void CreateNode(string text, Form f)
{
  // put form where it belongs on main form.
  // add text to tree, and link it to f.
}

void HandleTreeClick()
{
  activeForm.Hide();
  Node n = tree.GetCurrentNode();
  activeForm = n.Form;
  activeForm.Show();
}

===================================
This list is hosted by DevelopMentorĀ®  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com