473,695 Members | 2,533 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Two panels on one form with a Splitter. Works?

BBM
I'm trying to set up a form with two panels divided by a Splitter control.

I can make the Splitter work in the situations described in the documentation (Listbox or TreeView on left w/Dock set to Left, Panel on right of form w/ Dock set to Fill, Splitter between them set w/ Dock set to Left. Works as advertised.

But... if I change to have two panels on the form one on the left with Dock set to Left, a panel on the right with Dock set to Fill, and a Splitter w/ Dock set to Left then the form looks great when you run it, and you can access the Splitter (the cursor changes to the "move Splitter" cursor) but I CANNOT drag the Splitter (the panel on the left does not re-size). Is there a setting I'm overlooking, or does the Splitter just not work between two panels?

Thanks. Sorry if this isn't the right group to post to for WinForms questions.
Nov 16 '05 #1
4 8099
You may have to play around a little bit with SendToBack button,
BringToFront button in the designer toolbar. Select a panel and change those
options.

Splitter will work even in design mode. You will able to resize panels using
splitter during design mode.

--
Shak
(Houston)
"BBM" <bb*@bbmcompany .com> wrote in message
news:2E******** *************** ***********@mic rosoft.com...
I'm trying to set up a form with two panels divided by a Splitter control.

I can make the Splitter work in the situations described in the documentation (Listbox or TreeView on left w/Dock set to Left, Panel on
right of form w/ Dock set to Fill, Splitter between them set w/ Dock set to
Left. Works as advertised.
But... if I change to have two panels on the form one on the left with Dock set to Left, a panel on the right with Dock set to Fill, and a Splitter
w/ Dock set to Left then the form looks great when you run it, and you can
access the Splitter (the cursor changes to the "move Splitter" cursor) but I
CANNOT drag the Splitter (the panel on the left does not re-size). Is
there a setting I'm overlooking, or does the Splitter just not work between
two panels?
Thanks. Sorry if this isn't the right group to post to for WinForms questions.

Nov 16 '05 #2
Make sure that in InitializeCompo nent the controls are being added in this
order

1. panel with fill dock
2. splitter with left dock
3. panel with left dock

--
-Sijin Joseph
http://www.indiangeek.net
http://weblogs.asp.net/sjoseph
"BBM" <bb*@bbmcompany .com> wrote in message
news:2E******** *************** ***********@mic rosoft.com...
I'm trying to set up a form with two panels divided by a Splitter control.

I can make the Splitter work in the situations described in the documentation (Listbox or TreeView on left w/Dock set to Left, Panel on
right of form w/ Dock set to Fill, Splitter between them set w/ Dock set to
Left. Works as advertised.
But... if I change to have two panels on the form one on the left with Dock set to Left, a panel on the right with Dock set to Fill, and a Splitter
w/ Dock set to Left then the form looks great when you run it, and you can
access the Splitter (the cursor changes to the "move Splitter" cursor) but I
CANNOT drag the Splitter (the panel on the left does not re-size). Is
there a setting I'm overlooking, or does the Splitter just not work between
two panels?
Thanks. Sorry if this isn't the right group to post to for WinForms questions.

Nov 16 '05 #3
BBM
Thanks for your response.

As far as I can tell, the SendToBack and BringToFront buttons only affect the way controls look in the Designer. My problem (I think) was in that I was not putting the controls on the design surface in the correct order. I got it to work by putting the controls on the surface in this order...

1) Added Panel1 with Dock set to Left (width about 1/3 of the form),
2) Dropped Splitter to right of Panel1 and set Dock to Left,
3) Dropped Panel2 in area to right of Panel1 and set Dock to Fill.

When I run this form, the Splitter now controls the size of the two panels.

You are right in that unless Panel2 is set to BringToFront you cannot see the Splitter. I couldn't get the Splitter to work in Design Mode though. I'm using the standard WinForms controls.

Thanks for your help.

"Shakir Hussain" wrote:
You may have to play around a little bit with SendToBack button,
BringToFront button in the designer toolbar. Select a panel and change those
options.

Splitter will work even in design mode. You will able to resize panels using
splitter during design mode.

--
Shak
(Houston)
"BBM" <bb*@bbmcompany .com> wrote in message
news:2E******** *************** ***********@mic rosoft.com...
I'm trying to set up a form with two panels divided by a Splitter control.

I can make the Splitter work in the situations described in the

documentation (Listbox or TreeView on left w/Dock set to Left, Panel on
right of form w/ Dock set to Fill, Splitter between them set w/ Dock set to
Left. Works as advertised.

But... if I change to have two panels on the form one on the left with

Dock set to Left, a panel on the right with Dock set to Fill, and a Splitter
w/ Dock set to Left then the form looks great when you run it, and you can
access the Splitter (the cursor changes to the "move Splitter" cursor) but I
CANNOT drag the Splitter (the panel on the left does not re-size). Is
there a setting I'm overlooking, or does the Splitter just not work between
two panels?

Thanks. Sorry if this isn't the right group to post to for WinForms

questions.


Nov 16 '05 #4
BBM
Shakir:

I owe you an apology. You are correct, you can affect the behavior of the
panels separated by a Splitter using SendToBack / BringToFront. The splitter
needs to know the "docking priority" to decide which control "owns" the
common edge to which the controls are docked. For some reason the "docking
priority" is the REVERSE of the z-order (depth) of the control on the design
surface. You control the z-order by using the SendToBack / BringToFront
buttons. Using BringToFront sets z-order to zero, which makes it the LOWEST
docking priority. Other controls with a higher z-order will squeeze the one
with the lowest z-order when the Splitter is moved.

Thanks for your help.

BBM

"Shakir Hussain" wrote:
You may have to play around a little bit with SendToBack button,
BringToFront button in the designer toolbar. Select a panel and change those
options.

Splitter will work even in design mode. You will able to resize panels using
splitter during design mode.

--
Shak
(Houston)
"BBM" <bb*@bbmcompany .com> wrote in message
news:2E******** *************** ***********@mic rosoft.com...
I'm trying to set up a form with two panels divided by a Splitter control.

I can make the Splitter work in the situations described in the

documentation (Listbox or TreeView on left w/Dock set to Left, Panel on
right of form w/ Dock set to Fill, Splitter between them set w/ Dock set to
Left. Works as advertised.

But... if I change to have two panels on the form one on the left with

Dock set to Left, a panel on the right with Dock set to Fill, and a Splitter
w/ Dock set to Left then the form looks great when you run it, and you can
access the Splitter (the cursor changes to the "move Splitter" cursor) but I
CANNOT drag the Splitter (the panel on the left does not re-size). Is
there a setting I'm overlooking, or does the Splitter just not work between
two panels?

Thanks. Sorry if this isn't the right group to post to for WinForms

questions.


Nov 16 '05 #5

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

Similar topics

1
1780
by: Bevo | last post by:
I have two panels on my form with a splitter between them. The top panel is docked Fill and the bottom is docked Bottom. The splitter is docked Bottom. When I run and try to move the splitter the System.Windows.Form.dll throws an SEHException at me. Is this a .NET Framework bug and does anybody know a workaround?
1
1984
by: AndrewDucker | last post by:
I've just started working with some people that have an odd setup and I'm wondering if someone can point out a better way of doing things (or what I'm doing wrong). They have a base form class, derived from the standard Form, but with the ability to show a list of panels in order. Each of these panels is a subclass of a subclass of Panel. The initial subclass is tweaked to work with the special form and then each subclass of that is...
1
2814
by: B | last post by:
Hi, I would like to split up an mdi form using a splitter where a datagrid would be on the left side and child forms on the right side. So far, I have placed a splitter on the form, dragged it to the right just wide enough to drop a datagrid control onto it. I don't know if this is even correct usage. I would like to be able to drag the splitter to the right to expose more of the datagrid. How could I accomplish this? Are there...
5
1795
by: Sam | last post by:
Hi, I would like to reproduce the same control as in Visual Studio for the propery editor or the message feedback window. That is, a scrolling panel that would appear when the mouse is over one of the side of the main form. There should be the possibility to anchor it as well. How can I do that ? Thx
2
3214
by: Zach | last post by:
I have a situation similar to what you see in Visual Studio Options menu. A Tree View on the left, and depending on what type of node you click it dynamically loads a panel into the right hand side of the form. It would be really nice if I could design all possible right hand side panels in the forms designer, then have some way to tell the framework "load the form represented by the class SuchAndSuchForm". What I have to resort to...
0
1514
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: _ |_|
1
6068
by: JDeats | last post by:
I have a simple WinForm with a WinForms splitter down the middle. I would like to make it so when the user clicks on a button inside the left portion of the screen (the panel to the splitters left) that portion of the form is reduced in size by about 90% (I want to shrink this area of the of the form). The splitter doesn't appear to have any methods for programmatic resizing, I tried changing it's width settings and the splitter moved...
6
1949
by: =?Utf-8?B?bGpsZXZlbmQy?= | last post by:
I want to implement the following: If the user clicks on the border of a form, then I want to show a box around the form that represents the form's bounds. As the user moves the mouse only the box's bounds would change. When the user releases the mouse the form's bounds would be set to the bounds of the box. Note that this is very similar to how the Splitter control works. Does anybody know how to do this?
2
2528
by: Rastko Soskic | last post by:
Hi everyone! I need some tips, ideas, suggestions on best approach to create "resizable panels". The best example what I am trying to achieve could be MSN mail (hotmail) which have separate, resizable panels for folders (inbox, sent, etc.) and for messages. Maybe someone knows exactly how that "splitter" functionality is implemented :) Those MVPs should know :)))) Thanks in advance :)
0
8642
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 usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8583
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 synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9002
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8861
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 most users, this new feature is actually very convenient. If you want to control the update process,...
0
7673
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 launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5841
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 into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4588
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2283
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
1984
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.