以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  为什么anchor不起作用  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=60675)

--  作者:jiangxun
--  发布时间:2014/11/28 22:21:00
--  为什么anchor不起作用

    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

上述代码没有起到右端锚定的作用,请指教


 


--  作者:jiangxun
--  发布时间:2014/11/28 22:24:00
--  
ctl.right执行后也提示没有right这个属性