PUBLIC oform1 oform1=NEWOBJECT("form1") oform1.Show RETURN ************************************************** *-- Form: form1 *-- ParentClass: form *-- BaseClass: form *-- Time Stamp: 11/20/00 12:18:05 PM * DEFINE CLASS form1 AS form DataSession = 2 Height = 241 Width = 242 DoCreate = .T. OLEDropMode = 1 AutoCenter = .T. Caption = "Form1" Name = "Form1" DIMENSION avalues[1,1] DIMENSION asource[1,1] ADD OBJECT list1 AS listbox WITH ; RowSourceType = 5, ; RowSource = "thisform.asource", ; Height = 170, ; Left = 24, ; TabIndex = 2, ; Top = 47, ; Width = 192, ; Name = "List1" ADD OBJECT text1 AS textbox WITH ; Comment = "", ; Height = 23, ; Left = 24, ; TabIndex = 1, ; Top = 23, ; Width = 192, ; Name = "Text1" PROCEDURE Init SET EXACT OFF ENDPROC PROCEDURE list1.Init LOCAL ji With thisform dimension .aSource(5,2) .asource[1,1] = "Bush" .asource[2,1] = "Buchanan" .asource[3,1] = "Gore" .asource[4,1] = "Nader" .asource[5,1] = "Goober" for ji = 1 to alen(.asource,1) .asource[ji,2]=upper(.asource[ji,1]) endfor asort(.asource) EndWith this.rowsource = "thisform.asource" this.requery() ENDPROC PROCEDURE text1.InteractiveChange thisform.list1.listindex = ; ceiling(ascan(thisform.asource,allt(upper(this.value)))/2) ENDPROC ENDDEFINE * *-- EndDefine: form1 **************************************************