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
1
vote
1 answer

Setting splitContainer property sizes depending on Form size C# WinForms

I am having trouble setting splitContainer sizes depending on my Form size. When my form is loaded it is at a MinimumSize of 1170,930. But if I resize my form both .SplitterDistance and .Panel2MinSize are at different places then where they should…
Magic Mick
  • 1,475
  • 1
  • 21
  • 32
1
vote
1 answer

SplitterDistance Property won't get smaller than 25 pixels

I have a split container within a split container, and when I set the SplitterDistance to anything less than 25 pixels, the SplitterDistance will not get smaller. I can make it smaller than 25 pixels during run-time with no problem. I can make it…
J_C
  • 79
  • 9
1
vote
2 answers

Change the height of the panel of the split container at runtime

I have a splitcontainer and I would change the height of the panel1 at runtime. I use this code Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click SplitContainer1.Panel1.Height = 2 …
Dhibi_Mohanned
  • 283
  • 1
  • 7
  • 15
1
vote
1 answer

Adding many buttons to a splitContainer (winforms)

I was searching for answer, but couldn't find anything, so: I am making simple project and I have a problem with this: // fragment of code in parent form Random r = new Random(); private void BeginGame() { SetName(); sheep = new…
Marcin
  • 93
  • 1
  • 6
1
vote
0 answers

Redesigning custompanel upon userclick in C#

I am using C# in a WinForm on Visual Studio 2010. I made a custompanel with 10 richtextboxes inside it. Each richtextbox refers to a column in a table of custompanels. The custompanels load inside of a splitcontainer at runtime. When the user…
1
vote
1 answer

Override resize behavior of winform window

I have a winform window. When I change the size of the screen, the screen immediately increases or decreases. I would prefer the Resize behavior of the window will be like Split Container, as long as I drag the mouse I see only line that marks what…
Hodaya Shalom
  • 4,327
  • 12
  • 57
  • 111
1
vote
3 answers

How to get all buttons and labels under splitContainer.Panel2

I want to get the background color of all buttons and labels under splitContainer.Panel2. When I try it I discover I not success to run on any control (under Panel2) I try this code: foreach (Control c in…
AsfK
  • 3,328
  • 4
  • 36
  • 73
1
vote
1 answer

SplitContainer panel to fit content automatically

I'm looking for pretty simple functionality, however I cannot find it (and surprisingly I cannot find anyone else asking this question). I've got split container with two panels - pretty simple setup, navigational TreeView on the left, ListView…
Martin Zugec
  • 165
  • 1
  • 7
1
vote
2 answers

How can I make the splitter visible on a SplitPanel without creating a border

Using 3 nested SplitContainers in my Windows Forms Application. When encountered the same problem that other have with the splitter bar being the same color as the surrounding panels. The common solution seems to be to change the BackColor but when…
Fr33dan
  • 4,227
  • 3
  • 35
  • 62
1
vote
2 answers

Custom SplitContainer

I'm using standart SplitContainer - very useful thing, but sincerely it looks a little ugly. I took a look through other kind of SplitContainer implementation for ex. FireFox. Could You tell me - how to custom draw the Split bar in order to look a…
DreadAngel
  • 772
  • 11
  • 30
1
vote
0 answers

What caused my splitter to move?

I've got an issue that's doing my head in. I have a .net usercontrol with a splitcontainer control on it. The .net usercontrol is actually hosted in a control container in much older non .net legacy code (Visual Objects). The problem I'm having is…
MrBonk
  • 11
  • 3
0
votes
1 answer

Conflict with MDI and SplitContainer

I am using a SplitContainer to split a MDI form vertically. On the left panel I have a tree control and on the right panel I am displaying the child forms. I am trying to ensure only a single instance of a child form is open at any time. To do that…
cosmos
  • 2,414
  • 4
  • 23
  • 25
0
votes
1 answer

How to close the current form in a SplitContainer?

I have a user control in my SplitContainer's right panel. A form opens below the user control. Now if i click a button in the user control, that current form should close and a new form should open. How to do this?
pavan
  • 143
  • 1
  • 3
  • 10
0
votes
0 answers

Python Selenium: Accessing Split Container Pane

I'm attempting to access a section of an internal webpage and the structure is setup with:
0
votes
3 answers

I want to retrieve the sub form values

I have a SplitContainer, and in its right panel I have a Form. I want to retrieve the values of the TextBoxes of the form when I click on a button outside the Form, but inside the panel. How to do it?
pavan
  • 143
  • 1
  • 3
  • 10
1 2 3
8 9