以文本方式查看主题 - Foxtable(狐表) (http://foxtable.com/bbs/index.asp) -- 专家坐堂 (http://foxtable.com/bbs/list.asp?boardid=2) ---- 设置标签文本对齐方式 (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=193071) |
-- 作者:cd_tdh -- 发布时间:2024/8/14 14:32:00 -- 设置标签文本对齐方式 Dim frm As WinForm.Form = e.Form For Each c As WinForm.Control In frm.Controls If TypeOf c Is WinForm.Label Then \'判断控件是否是按钮 c.TextAlign = ContentAlignment.MiddleRight End If Next 老师,黄色代码设置标签文本对齐方式怎么报错呢?
[此贴子已经被作者于2024/8/14 14:44:20编辑过]
|
-- 作者:有点蓝 -- 发布时间:2024/8/14 15:00:00 -- If TypeOf c Is WinForm.Label Then \'判断控件是否是按钮 Dim la As WinForm.Label = c la.TextAlign = ContentAlignment.MiddleRight End If
|
-- 作者:cd_tdh -- 发布时间:2024/8/15 9:20:00 -- 哎,帮助里面都没注意 Dim lbl As WinForm.Label = e.Form.Controls("Label1")
lbl.BorderStyle = BorderStyle.FixedSingle lbl.TextAlign = ContentAlignment.MiddleCenter lbl.BorderColor = Color.Red |