老师, 下面标颜色的代码有误,劳烦您给看下
Dim tbl As WinForm.TabControl = e.Form.CreateControl("tbl_01", ControlTypeEnum.TabControl) e.Form.AddControl(tbl) Dim panl As WinForm.Panel=e.Form.CreateControl("pl_01", ControlTypeEnum.Panel) Dim spl As WinForm.SplitContainer=e.Form.CreateControl("spl_01", ControlTypeEnum.SplitContainer) spl.Dock=5 panl.AddControl(spl) MessageBox.Show(5) tbl.TabPages(0).AddControl(panl) MessageBox.Show(6)
Dim w As Integer=tbl.TabPages("1").Width Dim h As Integer=tbl.TabPages("1").Height If w-350<=0 Then spl.SplitterDistance =w*0.2'必须是添加控件后添加的属性 Else spl.SplitterDistance =350'必须是添加控件后添加的属性 End If
|