By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,955 Members | 1,756 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,955 IT Pros & Developers. It's quick & easy.

dynamic controls in split container

P: n/a
I have a windows application that has a split container in the client area.
In the left panel, I added controls via the designer in VS 2005. In the right
panel, I want to dynamically create and display other forms that I created in
the project. Is this possible? Can the panel2 of a split container be the
container for a dynamically created form? How else can I create a series of
other windows (forms) and place them in the right panel of the split
container at run time? I am sure there is a way, just not familiar enough
with VS 2005 or C# to know. Thanks.
Nov 17 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
>I have a windows application that has a split container in the client area.
In the left panel, I added controls via the designer in VS 2005. In the
right
panel, I want to dynamically create and display other forms that I created
in
the project. Is this possible?
Yes. Just create the form, panels, and other controls dynamically. You will
have to create each item and almost all of their attributes. Look at the
code that Visual Studio generates when you drop a control on a form. You
will have to mimic something like this.
Can the panel2 of a split container be the container for a dynamically
created form?
Wow. I am not quite sure what the question is here. You can create a panel
dynamically and link to it from code elsewhere. But, you have to handle
keeping track of the appropriate controls and linkage.
How else can I create a series of other windows (forms) and place them in
the right panel of the split container at run time?
Well, I can think of lots of ways to do this. The basic issue is creating
the controls, forms, panels, etc. dynamically, making sure you assign all of
the properties, and setup all of the linkages. Not necessarily hard to do,
but lots of details and usually quite a bit of code. The key will be having
good clean interfaces that are well organized, so that you can get to what
you need to when you need to.

You can use the Visaul Studio designer generated code as a basic guide on
what you need to do. It is really doing the same thing for a form. It just
writes the code for you.

Hope this helps...

Frisky

"Don Hames" <Do******@discussions.microsoft.com> wrote in message
news:76**********************************@microsof t.com...I have a windows application that has a split container in the client area.
In the left panel, I added controls via the designer in VS 2005. In the
right
panel, I want to dynamically create and display other forms that I created
in
the project. Is this possible? Can the panel2 of a split container be the
container for a dynamically created form? How else can I create a series
of
other windows (forms) and place them in the right panel of the split
container at run time? I am sure there is a way, just not familiar enough
with VS 2005 or C# to know. Thanks.

Nov 17 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.