以文本方式查看主题 - Foxtable(狐表) (http://foxtable.com/bbs/index.asp) -- 专家坐堂 (http://foxtable.com/bbs/list.asp?boardid=2) ---- [求助]net表格布局控件摆在面板容器中 (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=189243) |
-- 作者:风声 -- 发布时间:2023/11/19 7:32:00 -- [求助]net表格布局控件摆在面板容器中 老师,我想把net表格布局控件摆在Panel3面板中,谢谢老师。 Dim TblCt2 As New Windows.Forms.TableLayoutPanel e.Form.StopRedraw With TblCt2 .Name = "TblCt2" .RowCount = 3 .ColumnCount =3 .Anchor = Windows.Forms.AnchorStyles.Left Or _ Windows.Forms.AnchorStyles.Top _ Or Windows.Forms.AnchorStyles.Right _ Or Windows.Forms.AnchorStyles.Bottom .Location = New Point(0, 0) .Size = New Size(300, 100) .BackColor = System.Drawing.Color.Transparent .CellBorderStyle = Windows.Forms.TableLayoutPanelCellBorderStyle.Single .Gettype.GetProperty("DoubleBuffered", Reflection.BindingFlags.Instance Or System.Reflection.BindingFlags.NonPublic).SetValue(TblCt2, True, Nothing) .ColumnStyles.Add(New Windows.Forms.ColumnStyle(Windows.Forms.SizeType.Absolute, 86)) .ColumnStyles.Add(New Windows.Forms.ColumnStyle(Windows.Forms.SizeType.Absolute, 100)) .ColumnStyles.Add(New Windows.Forms.ColumnStyle(Windows.Forms.SizeType.Absolute, 65)) \' .RowStyles.Add(New Windows.Forms.RowStyle(Windows.Forms.SizeType.Absolute, 31)) \'1 .RowStyles.Add(New Windows.Forms.RowStyle(Windows.Forms.SizeType.Absolute, 31)) \'2 .RowStyles.Add(New Windows.Forms.RowStyle(Windows.Forms.SizeType.Absolute, 31)) \'3 [此贴子已经被作者于2023/11/19 7:33:59编辑过]
|
-- 作者:有点蓝 -- 发布时间:2023/11/19 20:12:00 -- e.Form.Controls("Panel3").basecontrol.Add(TblCt2) |
-- 作者:风声 -- 发布时间:2023/11/20 10:37:00 -- 谢谢老师 |