以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- [求助]groupbox排列 (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=110785) |
-- 作者:wangnovel -- 发布时间:2017/12/9 14:35:00 -- [求助]groupbox排列 界面上有三个并排的groupbox,请问如何设置,可以使他们的达到如下条件:1、不管显示器分辨率与大小如何变化,三个groupbox始终一样宽;2、三个groupbox始终能占满整个屏幕 |
-- 作者:有点蓝 -- 发布时间:2017/12/9 15:09:00 -- 窗口afterload、SizeChanged事件 Dim width As Integer = e.Form.width Dim w3 As Integer = cint(width/3) - 6 Dim g1 As WinForm.GroupBox = e.Form.Controls("GroupBox1") g1.Width = w3 g1.Left = 0 Dim g2 As WinForm.GroupBox = e.Form.Controls("GroupBox2") g2.Width = w3 g2.Left = w3+3 Dim g3 As WinForm.GroupBox = e.Form.Controls("GroupBox3") g3.Width = w3 g3.Left = w3*2+6 |
-- 作者:wangnovel -- 发布时间:2017/12/9 16:31:00 -- 谢谢 |