PUBLIC oform1 oform1=NEWOBJECT("form1") oform1.Show RETURN DEFINE CLASS form1 AS form Caption = "show a Listbox Scrolled event" ShowWindow = 2 Autocenter = .T. ADD OBJECT list1 AS ListBoxEx WITH ; RowSourceType = 1, ; RowSource = "A,B,C,D,E,E,F,G,H,I,Y,T,Y,G,F,R,E,D,E,R,R,R,ED,E,E,E,E,E,SD,S,S", ; Height = 182, ; Left = 32, ; Top = 20, ; Width = 151 ADD OBJECT TextBox1 AS TextBox WITH; LEFT = 200,; TOP = 20,; WIDTH = 100 PROCEDURE list1.Scrolled(items) WAIT windows "scrolled"+STR(m.items) NOWAIT ENDPROC ENDDEFINE DEFINE CLASS ListBoxEx As ListBox HIDDEN TopIndexLast TopIndexLast = 1 PROCEDURE MouseWheel LPARAMETERS nDirection, nShift, nXCoord, nYCoord * VFP have a design bug and NODEF + baseclass::MouseWheel doesn't work NODEFAULT *RETURN ListBox::MouseWheel(nDirection, nShift, nXCoord, nYCoord) this.TopIndex = m.this.TopIndex - SIGN(m.nDirection) ENDPROC PROCEDURE MouseUp LPARAMETERS nButton, nShift, nXCoord, nYCoord this.TopIndex=m.this.TopIndex ENDPROC PROCEDURE InteractiveChange this.TopIndex=m.this.TopIndex ENDPROC HIDDEN PROCEDURE TopIndex_Assign(TopIndex) This.TopIndex = m.TopIndex TopIndex = m.this.TopIndex- This.TopIndexLast IF EMPTY(m.TopIndex ) RETURN ENDIF This.TopIndexLast = m.this.TopIndex ********* only changes I made this.ListIndex = this.TopIndex thisform.TextBox1.Value = this.List(this.ListIndex) ********* RETURN this.Scrolled(m.TopIndex) PROCEDURE Scrolled(items) ENDDEFINEIs that what you want?