表单设计器中,如何单独编辑命令按钮组、选项按钮组中各个按钮?
1个回答
展开全部
把下面的代码1653写到表单的init事件回中
this.AddObject('CommandGroup1','CommandGroup')
With this.CommandGroup1
.ButtonCount = 15
.left = 0
.top = 0
.Height = 185
.Width = 220
Endwith
m.x = 10
m.y = 10
For i = 1 To 15
lcObject = 'Command' + Transform(i)
With thisform.CommandGroup1.&lcObject
答.top = m.y
.left = m.x
.Height = 25
.Width = 60
Endwith
m.x = m.x + 60 + 10
If i % 3 == 0
m.x = 10
m.y = 10 + (25 + 10) * Int(i / 3)
Endif
Next
this.CommandGroup1.visible = .t.
this.AddObject('CommandGroup1','CommandGroup')
With this.CommandGroup1
.ButtonCount = 15
.left = 0
.top = 0
.Height = 185
.Width = 220
Endwith
m.x = 10
m.y = 10
For i = 1 To 15
lcObject = 'Command' + Transform(i)
With thisform.CommandGroup1.&lcObject
答.top = m.y
.left = m.x
.Height = 25
.Width = 60
Endwith
m.x = m.x + 60 + 10
If i % 3 == 0
m.x = 10
m.y = 10 + (25 + 10) * Int(i / 3)
Endif
Next
this.CommandGroup1.visible = .t.
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询