写个简单示例:
图片附件: 游客没有浏览图片的权限,请
登录 或
注册
** test.prg
of=CREATEOBJECT("myForm")
of.show(1)
RETURN
DEFINE CLASS myForm as Form
ADD OBJECT list1 as listbox WITH top=10,left=10,width=150,;
columncount=4,columnlines=.f.,columnwidths="30,30,30,30"
PROCEDURE list1.Init
LOCAL i, nColumn
nColumn = 1
FOR i=9 TO 100 STEP 9
IF nColumn > 1
this.list[this.NewIndex, nColumn] = TRANSFORM(i)
ELSE
this.additem(TRANSFORM(i))
ENDIF
nColumn = IIF(nColumn<4, nColumn+1, 1)
ENDFOR
ENDPROC
ENDDEFINE