Questions tagged [splitcontainer]

Split Container is a object that allows the user to split a page/form in multiple sections with each section being resizable.

A split container in a WinForms application will allow for a vertical or horizontal split of the form. This split can be 50%/50% or any other percentage. The benefit is that the container can then be resized by dragging the 'bar' inbetween the panels so that one set of controls/information can be better viewed. The split container panels can also be completely collapsed so that a section of the form is hidden.

When resizing each panel gains space at the expense of another panel -> for example increasing panel1 to 75% of the screen space will mean that panel2 has the remaining 25%.

MSDN defines a split container as:

The Windows Forms SplitContainer control can be thought of as a composite; it is two panels separated by a movable bar. When the mouse pointer is over the bar, the pointer changes shape to show that the bar is movable.

122 questions
26
votes
3 answers

SplitContainer ISupportInitialize issue: VS2010 Targeting .NET 3.5

In VS2010 I had a project targeting .NET Framework 4.0 and then had to revert to target v. 3.5. Once this happened, the SplitContainer object that I had will not display and will actually throw an error: "Unable to cast object of type…
Austin
  • 1,521
  • 5
  • 15
  • 27
25
votes
4 answers

C# Prevent resizing of both splitcontainer panels

I have a SplitContainer and was wondering how I would go about setting a static size for both panels and prevent the user from having the ability to resize the panels. Would FixedPanel be the solution? From what I read, I don't think it is.
dangerisgo
  • 1,261
  • 3
  • 16
  • 28
18
votes
7 answers

Removing Windows' ugly Selection marker thing from Splitter in SpitContainer Control

I have a SplitContainer control, and the Splitter in the middle is very ugly. By setting the BackColor of the SplitContainer to (insert color here), then setting the BackColor of Panel1 and Panel2 to white, I can have my splitter looking nice. But…
βӔḺṪẶⱫŌŔ
  • 1,276
  • 3
  • 17
  • 33
13
votes
2 answers

Adding panels to SplitContainer in Windows Forms

I'm having trouble finding the documentation on how to add panels to a SplitContainer. I can create the SplitContainer fine, but I can't put the panels I've coded inside of the splitcontainer. I've tried…
David
  • 2,080
  • 5
  • 29
  • 44
12
votes
4 answers

SplitContainer Panel Resize Issue

The General Problem The application is C# WinForms .Net 4.0. I have a SplitContainer that takes up most of the form, it is set to Anchor in all directions so it re-sizes along with the form. The left panel (Panel1) has a simple menu, no problems…
musefan
  • 47,875
  • 21
  • 135
  • 185
11
votes
2 answers

How to add a Panel to SplitContainer?

I am using SplitContainer and it contains only 2 panels but I need 3(panels). QUESTIONS: Is it possible to add more panels to SplitContainer? if YES how? else why not? Thanks :-)
Pratik Deoghare
  • 35,497
  • 30
  • 100
  • 146
10
votes
5 answers

Fixed Panel Height in a SplitContainer

I have a WinForm containing a bindingNavigator at the top and a splitContainer with two horisontal panels below it. The splitContainer fills the space not occupied by the bindingNavigator. I would like to set the bottom panel to a fixed height of,…
Sakkle
  • 1,934
  • 9
  • 27
  • 39
8
votes
3 answers

Collapse 'button' for splitcontainer control

I'm using Microsoft's SplitContainer control in my WinForms desktop application. I'd like to have a small button (or any nice UI element) between the panels of the splitter control to collapse one of the panels. E.g. a 'button' with two parts, if I…
Tom
  • 3,899
  • 22
  • 78
  • 137
8
votes
1 answer

Nested SplitContainers bug the SplitterWidth

So I have 3 split containers, with 2 panels each. SplitContainer1 is the main container that is docked in the Form ( Parent ). SplitContainer1.Panel1 contains SplitContainer2 which is docked. SplitContainer1.Panel2 contains SpliContainer3 which is…
Peter
  • 83
  • 4
7
votes
2 answers

How to set the Parent Control from WinForms Designer in Visual Studio?

I am building my user interface in Visual Studio and I've noticed that there is not a set parent property in a control's property toolbar. I am wondering why this is so, and if there is a clean way to enable this feature. If it's not possible, why…
7
votes
5 answers

WinForms: Alternative to SplitContainer?

Are there any alternative controls someone can suggest to replace the WinForms SplitContainer? I don't like how the SplitContainer shows that weird, dotted strip when its selected and when its being dragged. I want to have the panels re-size as the…
Telanor
  • 4,419
  • 6
  • 29
  • 36
5
votes
5 answers

Disable focus cues on a SplitContainer

How can I disable the focus cues on a SplitContainer? I ask because I'd rather draw them myself using OnPaint in order to make it look somewhat smoother. I tried this: protected override bool ShowFocusCues { get { …
bytecode77
  • 14,163
  • 30
  • 110
  • 141
5
votes
1 answer

Collapsing and Expanding SplitContainer panels

I have 3 split containers in my winform application. splitContainer1, splitContainer2, splitContainer3 splitContainer1 is the main split container. in it's panel1 I put splitContainer2 and in its panel2 I have splitContainer3 I then added two…
Dumbo
  • 13,555
  • 54
  • 184
  • 288
5
votes
2 answers

Stop splitter from scaling panels in C#?

I have a SplitContainer with both panels filled. When I resize it, tho, both panels scale equally so the splitter is at the same relative distance in the container. I really need to block this feature. How do I do this?
Vercas
  • 8,931
  • 15
  • 66
  • 106
5
votes
3 answers

Common Practice - SplitContainer

Is it common practice to have a SplitContainer control, and then add another SplitContainer to it, and then add another, and another...? It just seems like there should be a better way, I mean, once you get up to about 3 or 4 SplitContainers, you…
βӔḺṪẶⱫŌŔ
  • 1,276
  • 3
  • 17
  • 33
1
2 3
8 9