I thing you could use an User Control or a Form for each page, and a
panel as a parent of this pages. Then write a simple method to assign
the User Control or Form to the panel.

Something like this:

private void ChangePanel(Control newControl)
{
        if (m_CurrentControl != null)
        {
                Form f = m_CurrentControl as Form;
                if( f != null )
                {
                        f.Close();
                }
                m_CurrentControl.Dispose();
        }

        m_CurrentControl = newControl;

        // Set Position
        m_CurrentControl.SetBounds( 0,0,panel.Width, panel.Height);
        // Anchor configuration
        m_CurrentControl.Anchor = AnchorStyles.Left | AnchorStyles.Right
| AnchorStyles.Top | AnchorStyles.Bottom;
        // Adopt him
        m_CurrentControl.Parent = panel;

        m_CurrentControl.Show();
}


That's an adaptation of some other method that I had, just an example,
is not tested.



Hope this helps,

Andres Manggini.
[EMAIL PROTECTED]

-----Original Message-----
From: Discussion forum for developers using Windows Forms to build apps
and controls [mailto:[EMAIL PROTECTED]] On Behalf Of
Kevin Hector
Sent: Friday, September 20, 2002 5:26 AM
To: [EMAIL PROTECTED]
Subject: Re: [DOTNET-WINFORMS] UI gallery?


I suppose a good example of what I need in terms of look and feel is the
"User Accounts" program under Windows XP. Clean, web style surfaces and
very simple single task "pages". This is the perfect style of interface
for my users (luddites).

My question is which windows form control could represent a "page" in
this context? Note that the menu on the left of the window does not
scroll with the main window, so this is very similar to a framed web
app. I hope to be able to design each "page" seperately and to
load/unload them as appropriate.

Thanks

Kevin

> > In concept that is exactly what is happening. However, the look and
>feel
> > of
> > tabbed dialogs is much different than forms that get swapped out as
> > controls in a parent window.
> >
> > Both have a place, but as a main window, I would vote against a
> > tabbed dialog.
> >
> > Just my 2 cents
>
>Agreed - I read too fast and missed the fact that it was a main window.




_________________________________________________________________
Chat with friends online, try MSN Messenger: http://messenger.msn.com

You can read messages from the Advanced DOTNET archive, unsubscribe from Advanced 
DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

Reply via email to