以文本方式查看主题

-  Foxtable(狐表)  (http://www.foxtable.com/bbs/index.asp)
--  专家坐堂  (http://www.foxtable.com/bbs/list.asp?boardid=2)
----  如何获取SplitPanel分区的宽度?  (http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&id=93666)

--  作者:一笑
--  发布时间:2016/12/3 18:58:00
--  如何获取SplitPanel分区的宽度?
分区面板有2个分区,如何获取第2个分区的宽度?
Dim p As WinForm.SplitPanel = Forms("动态测试").Controls("SplitContainer1").Panel2
Dim i As Integer 
i =  p.width
Output.show(i)

报错,求解,谢谢

--  作者:有点色
--  发布时间:2016/12/4 16:03:00
--  

Dim sp = Forms("动态测试").Controls("SplitContainer1")

msgbox(sp.SplitterDistance)

msgbox(sp.SplitterWidth)

msgbox(sp.width - sp.SplitterDistance - sp.SplitterWidth)