控件数组

来源:互联网 发布:淘宝服装设计投稿 编辑:程序博客网 时间:2024/06/16 02:49

1、获取控件数组乘员类型和名称

int li_count,li_i
li_count = upperbound(This.Control[])
for li_i = 1 TO li_count
 if This.Control[li_i].TypeOf() =Groupbox! then//获得控件类型
  IF ClassName(Control[li_i])='gb_2' then //ClassName(Controls[i]):获得控件名称
     inv_resize.of_register(This.control[li_i],"ScaleToRight&Bottom")
      END if
 end if
next


object winobjecttype[]long ll_count commandbutton lp_com FOR ll_count = 1 to UpperBound(Control[]) winobjecttype[ll_count] = TypeOf(Control[ll_count]) if winobjecttype[ll_count]=commandbutton! then //判断对象是否是按钮 lp_com=Control[ll_count] l p_com.text=string(ll_count)//更改属性值 end if NEXT

原创粉丝点击