For Each c As WinForm.Control In e.Form.Controls
e.Form.RemoveControl(c.name)
Next
e.form.Text = "数据模板_快捷输入"
e.form.baseform.Width = 470
e.Form.StopRedraw()
Dim lbl12 As WinForm.Button
Dim Value As String = DataTables("系统_数据模块").GetComboListString("模块名称","[模块类别] = '木作报价模块'","模块名称 Desc")
Dim sps() As Char = {"|"}
Dim Names() As String = Value.Split(sps)
Dim s As Integer = 2
Dim t As Integer = 5
For i As Integer = 0 To Names.length - 1
If i <> 0 Then
If i Mod 3 = 0 Then
s = 2
t = t + 41.5
Else
s = s + 80.5
End If
End If
Dim nm As String = Names(i)
lbl12 = e.Form.CreateControl(nm, ControlTypeEnum.Button)
lbl12.Text = nm
lbl12.name = nm
lbl12.Width = 80
lbl12.Height = 40
lbl12.Left = s + 2
lbl12.Top = t + 2
'lbl12.TextAlign = ContentAlignment.BottomCenter '控件文字位置
'lbl12.CheckAlign = ContentAlignment.TopCenter '控件复选框位置
'lbl12.BackColor = Color.LightSteelBlue
'lbl12.Theme = "System" '控件风格
e.Form.AddControl(lbl12)
lbl12.ToolTip = lbl12.Text '动态提示
想在 木作报价模块 下根据模块分组 显示 模块名称
Next
此主题相关图片如下:微信截图_20220414122605.png
[此贴子已经被作者于2022/4/14 13:11:57编辑过]