ctl = e.Form.CreateControl("LineRH" & e.form.controls("LineRH_number").text, ControlTypeEnum.line) ctl.ThickNess = 4 ctl.LineColor = Color.SteelBlue ctl.width = 60 ctl.Height = 4 ctl.anchor = Windows.Forms.AnchorStyles.Top Or Windows.Forms.AnchorStyles.Right
If ctl IsNot Nothing Then Dim body As object = e.Form.controls("pnl_body") ctl.Left = 100 ctl.Top = 100 body.AddControl(ctl)End If
上述代码没有起到右端锚定的作用,请指教