473,549 Members | 2,719 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Splitters and Docking

Has anyone really gotten the Docking and Splitter Bars to work for anyting
but the simplest application for two controls and one splitter bar filling
the whole form? If so, can you enlighten my on HOW! I even tried creating
background panels and docking them with the controls on the panels but the
docking order seems to be random! Another useless control from Microsoft I
think!
--
Dennis in Houston
Nov 21 '05 #1
25 5305
"Dennis" <De****@discuss ions.microsoft. com> schrieb:
Has anyone really gotten the Docking and Splitter Bars to work for anyting
but the simplest application for two controls and one splitter bar filling
the whole form? If so, can you enlighten my on HOW! I even tried
creating
background panels and docking them with the controls on the panels but the
docking order seems to be random!


Use the "Bring to foreground" and "Send into background" context menu items
of the controls in the Windows Forms designer to control the docking order.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
Nov 21 '05 #2
"Dennis" <De****@discuss ions.microsoft. com> schrieb:
Has anyone really gotten the Docking and Splitter Bars to work for anyting
but the simplest application for two controls and one splitter bar filling
the whole form? If so, can you enlighten my on HOW! I even tried
creating
background panels and docking them with the controls on the panels but the
docking order seems to be random!


Use the "Bring to foreground" and "Send into background" context menu items
of the controls in the Windows Forms designer to control the docking order.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
Nov 21 '05 #3
Dennis,

The splitter works fine when you know how, just some trying.

Your problem with the docking has nothing to do with the splitter, however
with the designer. When you use that it adds it in the way you drags it on
the form (Zorder).

It is easy to change in the designer generated code. Not efficient however
not really very expensive for performanse in my opinion is as well removing
those controls and adding them once in the load event (When you do it using
the designer you can do it everytime again when you change something)

What I find also very usefull to do is hidding and showing them. I have
forms where I have panels over panels as well splitting horizontal as
vertical. For that is however as well that Z order needed. (Z order is from
bottom to top.)

I hope this helps?

Cor
Nov 21 '05 #4
Dennis,

The splitter works fine when you know how, just some trying.

Your problem with the docking has nothing to do with the splitter, however
with the designer. When you use that it adds it in the way you drags it on
the form (Zorder).

It is easy to change in the designer generated code. Not efficient however
not really very expensive for performanse in my opinion is as well removing
those controls and adding them once in the load event (When you do it using
the designer you can do it everytime again when you change something)

What I find also very usefull to do is hidding and showing them. I have
forms where I have panels over panels as well splitting horizontal as
vertical. For that is however as well that Z order needed. (Z order is from
bottom to top.)

I hope this helps?

Cor
Nov 21 '05 #5

splitter control allows the user to resize THE DOCKED CONTROL that is
IMMEDIATELY BEFORE IT.
Therefore, to enable the user to resize a docked control at run
time:
1. Dock the control to be resized to an edge of a container.
2. Dock a splitter control to the same side of that container.

e.g: 1 splitter.
control1.Dock = DockStyle.Left
splitter1.Dock = DockStyle.Left
splitter1.MinEx tra = 100
' Set the minimum size control2 can be sized to.
splitter1.MinSi ze = 75
' Set the minimum size control1 can be sized to.
control2.Dock = DockStyle.Fill
' Set control2 to fill the remaining space on the form.
Me.Controls.Add Range(New Control() {control2, splitter1,
control1}) ' Add in reverse order to ensure proper location.

e.g: 2 Splitters.
control1.Dock = System.Windows. Forms.DockStyle .Left
control1.Width = Me.ClientSize.W idth \ 3
control2.Dock = System.Windows. Forms.DockStyle .Top
control2.Height = Me.ClientSize.H eight * 2 \ 3
control3.Dock = System.Windows. Forms.DockStyle .Fill

splitter1.Locat ion = New System.Drawing. Point(121, 0)
splitter1.Width = 3
splitter2.Dock = System.Windows. Forms.DockStyle .Top
splitter2.Heigh t = 3

panel1.Controls .AddRange(New System.Windows. Forms.Control()
{control3, splitter2, control2}) ' Add in reverse order to ensure proper
location
panel1.Dock = System.Windows. Forms.DockStyle .Fill

Me.Controls.Add Range(New System.Windows. Forms.Control() {panel1,
splitter1, control1}) ' Add in reverse order to ensure proper location

Good Luck.
Atara

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 21 '05 #6

splitter control allows the user to resize THE DOCKED CONTROL that is
IMMEDIATELY BEFORE IT.
Therefore, to enable the user to resize a docked control at run
time:
1. Dock the control to be resized to an edge of a container.
2. Dock a splitter control to the same side of that container.

e.g: 1 splitter.
control1.Dock = DockStyle.Left
splitter1.Dock = DockStyle.Left
splitter1.MinEx tra = 100
' Set the minimum size control2 can be sized to.
splitter1.MinSi ze = 75
' Set the minimum size control1 can be sized to.
control2.Dock = DockStyle.Fill
' Set control2 to fill the remaining space on the form.
Me.Controls.Add Range(New Control() {control2, splitter1,
control1}) ' Add in reverse order to ensure proper location.

e.g: 2 Splitters.
control1.Dock = System.Windows. Forms.DockStyle .Left
control1.Width = Me.ClientSize.W idth \ 3
control2.Dock = System.Windows. Forms.DockStyle .Top
control2.Height = Me.ClientSize.H eight * 2 \ 3
control3.Dock = System.Windows. Forms.DockStyle .Fill

splitter1.Locat ion = New System.Drawing. Point(121, 0)
splitter1.Width = 3
splitter2.Dock = System.Windows. Forms.DockStyle .Top
splitter2.Heigh t = 3

panel1.Controls .AddRange(New System.Windows. Forms.Control()
{control3, splitter2, control2}) ' Add in reverse order to ensure proper
location
panel1.Dock = System.Windows. Forms.DockStyle .Fill

Me.Controls.Add Range(New System.Windows. Forms.Control() {panel1,
splitter1, control1}) ' Add in reverse order to ensure proper location

Good Luck.
Atara

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 21 '05 #7
Thank you for your replies. I didn't know that that the Zorder affected the
way the controls were docked. It's still difficult to get the controls and
splitters where you want them.

"Dennis" wrote:
Has anyone really gotten the Docking and Splitter Bars to work for anyting
but the simplest application for two controls and one splitter bar filling
the whole form? If so, can you enlighten my on HOW! I even tried creating
background panels and docking them with the controls on the panels but the
docking order seems to be random! Another useless control from Microsoft I
think!
--
Dennis in Houston

Nov 21 '05 #8
Thank you for your replies. I didn't know that that the Zorder affected the
way the controls were docked. It's still difficult to get the controls and
splitters where you want them.

"Dennis" wrote:
Has anyone really gotten the Docking and Splitter Bars to work for anyting
but the simplest application for two controls and one splitter bar filling
the whole form? If so, can you enlighten my on HOW! I even tried creating
background panels and docking them with the controls on the panels but the
docking order seems to be random! Another useless control from Microsoft I
think!
--
Dennis in Houston

Nov 21 '05 #9
Ok, I got the splitter to working and the panels where I want them. However,
when I add two controls and a splitter between them to a panel as chldren of
the panel, they show up ok but I can't resize the widths of the controls
using the splitter between them. It works fine if the two controls and
splitter are directly on a form but when they are children of a panel, it
doesn't work.

"Cor Ligthert" wrote:
Dennis,

The splitter works fine when you know how, just some trying.

Your problem with the docking has nothing to do with the splitter, however
with the designer. When you use that it adds it in the way you drags it on
the form (Zorder).

It is easy to change in the designer generated code. Not efficient however
not really very expensive for performanse in my opinion is as well removing
those controls and adding them once in the load event (When you do it using
the designer you can do it everytime again when you change something)

What I find also very usefull to do is hidding and showing them. I have
forms where I have panels over panels as well splitting horizontal as
vertical. For that is however as well that Z order needed. (Z order is from
bottom to top.)

I hope this helps?

Cor

Nov 21 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
2932
by: Lecture Snoddddgrass | last post by:
Greetings, Can anyone recommend a good 3rd party docking windows component for WinForms? I'm looking for something that allows windows to not only be docked but to "popout", much like the Solution Explorer or Toolbox in Visual Studio.NET. For my last project, I used the SyncFusion component for docking windows, but my experience is that...
2
2695
by: Gary Shell | last post by:
We are playing around with using the splitter on a form and want to do the following: 1. On the left side of the form will be a tree view. 2. To the right of that tree view would be a splitter. 3. To the right of that splitter would be a second tree we call a palette. 4. To the right of the palette would be another splitter. 5. To the...
0
315
by: Dennis | last post by:
Has anyone really gotten the Docking and Splitter Bars to work for anyting but the simplest application for two controls and one splitter bar filling the whole form? If so, can you enlighten my on HOW! I even tried creating background panels and docking them with the controls on the panels but the docking order seems to be random! Another...
3
1357
by: Rob Mayo | last post by:
This is a stupid problem to have, but here goes. I wanted to make like an Outlook-looking app. Multiple splitters, panes, etc. If I ... 1. Take a Form, add a TreeView, dock it Left. 2. Add a Splitter, dock it Left. 3. Add a ListView, dock it Full ....I have no problems, but If I...
4
4992
by: Enrique | last post by:
hi all, i'd like to know how i could do a docking menu and docking toolbar. i know it's not so easy y VS .NET 2002 and 2003. anything will help me: links, code, articles..... thanks a lot for your responses and i wish you a merry christmas :-)
1
2026
by: Joe | last post by:
I'm creating a C# application, and want to use docking windows. However, I want the docking windows to look like the docking windows withing VS2005, with a title bar, close button, etc... When the user clicks and drags the docking window, it'll un-dock, and open in a tool window, and also allow the user to re-dock it elsewhere... Any...
0
1512
by: ohadasor | last post by:
Hello, I'm using .NET Framework 2.0. I'm creating several panels, one above the other, with splitters between them. I'm using Splitter and not SplitContainer, because the latter is such a big mess when you need to put splitters between more than two windows. To be more specific, my splitters and panels are like that: _ |_|
2
2626
by: Matt Brown - identify | last post by:
Hello, I've spent the better part of the day going over code and thinking and have come up with the following docking method that works perfectly. At this point, my brain is about to explode and I was wondering if someone can help me figure out the calculations for right and bottom docking: note: lRelOffsetLeft and lRelOffsetTop are...
2
2125
by: =?Utf-8?B?aGVyYmVydA==?= | last post by:
I need to develop a "docking station" simulator for Apple IPod in .NET. The PC acting as a development station connects to the IPod docking station using a parallel port. Where is this software available ? Where can I find the Ipod docking station specs? as an alternative, is a "docking station" library available in .NET? thank you...
0
7520
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7450
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
1
7470
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7809
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6043
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5368
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5088
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3481
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1941
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.