Splitcontainer, Make a fixed panel

◇◆丶佛笑我妖孽 提交于 2019-12-10 18:16:21

问题


I have a splitcontainer with horizontal orientation.

I want a fixed height for panel2 only during form resize, and let splitter resize panel2

Now I'm doing it this way, but I'm not satisfy because user notice that the panel resize

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?


回答1:


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



来源:https://stackoverflow.com/questions/2405143/splitcontainer-make-a-fixed-panel

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!