Split container, make a fixed panel

I have a separation container with a horizontal orientation.

I want a fixed height for panel2 only while resizing the form, and let the resize panel2 separator

Now I do it like this, but I'm not satisfied because the user notices that the size of the panel

Private Sub Form1_ResizeBegin(ByVal sender As Object, ByVal e As System.EventArgs) _
Handles Me.ResizeBegin 
    spil = SplitContainer1.Height - SplitContainer1.SplitterDistance
End Sub

Private Sub Form1_ResizeEnd(ByVal sender As Object, ByVal e As System.EventArgs) _
Handles Me.ResizeEnd
    SplitContainer1.SplitterDistance = SplitContainer1.Height - spil
End Sub

Any ideas?

+3
source share
1 answer

Have you tried setting SplitContainer1.FixedPanel = Panel1 (and removing both events)?

+7
source

Source: https://habr.com/ru/post/1736019/


All Articles