Resizing the Control Up, Down, Left, and Right on the SplitContainer

Asked 2 years ago, Updated 2 years ago, 119 views

Regarding the development of Visual studio 2017 windows form, I would like to ask about SplitContainer.Using SplitContainer control, we would like to place players on four panels in the upper and lower columns and resize any player by dragging while each player plays the video.

However, if you select SplitContainer side by side, you can only resize left and right (see attached picture). This is the limit of SplitContainer specification, but if there is a way to resize it freely, please let me know.
SplitContainer Image

visual-studio winforms

2022-09-30 16:08

1 Answers

If you are using only two SplitContainers

The following are possible options:

  • Write the action to resize yourself based on the mouse event in the form
  • Add SplitContainer to nest as follows (order of split directions is your choice)
    • Place the base split SplitContainer
    • Place SplitContainers on each of the above panels
  • Place the base split SplitContainer
  • Place SplitContainers on each of the above panels

The machine translation is a little strange, but there is a description below.
SplitContainer Control Overview (Windows Form)

You can also nest one or more SplitContainer controls horizontally, creating the top and bottom panels of the second SplitContainer.

The layout of the split is different, but here's an article on how to think and how to do it.
Create form with splitcontainer
Example of dividing horizontally into three parts

If you can't use three SplitContainers

I have set up and processed the following settings and fixed them myself (so I will release them):

  • The FixedPanel property of the underlying SplitContainer is not None or the IsSplitterFixed property is True
  • Formal loading, processing, events, etc.
  • performing the above immobilization process

Here's an example of a reference article.
[C#]How to secure SplitContainer Panel
04.Fix specific panel sizes during resize events


2022-09-30 16:08

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.