Publi yform yform=Newobject("asup") yform.Show Read Events Retu * Define Class asup As Form Caption = "Click or rightclick on listbox" Name = "Form1" Procedure myevt Sele ycurs _Cliptext=company Messagebox("company= "+company,0+32+4096,'added to clipboard',1000) Endproc Procedure myevt1 _Cliptext=fax Messagebox("fax= "+fax,0+32+4096,"added to clipboard",1000) Endproc Procedure Destroy Clea Event Endproc Procedure Init Sele company,fax From Home(1)+"samples\data\customer" Into Cursor ycurs Thisform.ShowTips=.T. Thisform.AddObject('oList1','ListBox') With Thisform.oList1 .RowSource = "ycurs" &&"oldjobs" .RowSourceType=2 .Visible=.T. .Top=186 .Left=350 .Width=250 .ColumnCount=2 .ColumnWidths='150,150' .SelectedItemBackColor=Rgb(70,60,50) .SelectedItemForeColor=Rgb(10,191,160) .SpecialEffect=1 .ItemBackColor=Rgb(40,40,40) .ItemForeColor=Rgb(255,204,153) * .BorderStyle = 1 &&inexistant property .BorderColor=Rgb(235,132,0) &&added for test .ItemTips=.T. .Move(10,10) .Anchor=15 .MousePointer=15 Endwith With Thisform .Width=640 .Height=480 Endwith Bindevent(This.oList1,"click",Thisform,"myevt") Bindevent(This.oList1,"rightclick",Thisform,"myevt1") Endproc Enddefine * *-- EndDefine: asup ***********************