SplitContainer中,做一个固定的面板 [英] Splitcontainer, Make a fixed panel

查看:1171
本文介绍了SplitContainer中,做一个固定的面板的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有水平方向的一个SplitContainer的。

I have a splitcontainer with horizontal orientation.

我想要是Panel2一个固定的高度只在形式调整大小,并让分离器调整是Panel2

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

任何想法?

推荐答案

你试过设置SplitContainer1.FixedPanel = Panel1的(和删除这两个事件)?

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

这篇关于SplitContainer中,做一个固定的面板的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆