当前位置: 代码迷 >> PB >> PB控件赋值有关问题
  详细解决方案

PB控件赋值有关问题

热度:31   发布时间:2016-04-29 09:02:03.0
PB控件赋值问题
有若干Edit Mask控件,名称相似,
请问如何用FOR语句实现赋值操作

------解决方案--------------------
这样写可能方便些,只需要在窗口打开时遍一次即可。

设置一个窗口变量(instance variables)
editmask iem_edit[]

然后在窗口的open事件中写:
C# code
long i,ll_pos,ll_numstring ls_classnamefor i = 1 to upperbound(this.control[])    if this.control[i].typeof() = editmask! then        ls_classname = this.control[i].classname()        ll_pos = lastpos(ls_classname,'_')        ll_num = long(right(ls_classname,len(ls_classname) - ll_pos))        iem_edit[ll_num] = this.control[i]    end ifnext
  相关解决方案