publi yform
yform=newObject("asup")
yform.show
retu
DEFINE CLASS asup AS form
Height = 224
Width = 669
AutoCenter = .T.
Caption = "Test combo images with 3000 records"
Name = "Form1"
ADD OBJECT combo1 AS combobox WITH ;
Height = 49, ;
Left = 12, ;
Top = 12, ;
Width = 349, ;
Name = "Combo1"
ADD OBJECT label1 AS label WITH ;
AutoSize = .T., ;
FontBold = .T., ;
FontSize = 10, ;
Caption = "", ;
Height = 18, ;
Left = 372, ;
Top = 24, ;
Width = 2, ;
ForeColor = RGB(255,0,0), ;
Name = "Label1"
PROCEDURE Init
local t0,m.xpict1,m.xpict2
t0=seconds()
m.xpict1=home(1)+"graphics\bitmaps\assorted\note.bmp"
m.xpict2=home(1)+"graphics\bitmaps\assorted\beany.bmp"
with thisform.combo1
for i=1 to 3000
.additem(trans(i)+"...........")
if mod(i,2)=0
.Picture[m.i] =m.xpict1
else
.Picture[m.i]=m.xpict2
endi
endfor
.mousepointer=15
.listindex=1
.style=2
endwith
thisform.label1.caption="Time ellapsed="+trans(seconds()-t0)+" sec !"
ENDPROC
ENDDEFINE