有若干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