ListBox Scroll Behavior Depends on Physical DimensionsID: Q138602 The information in this article applies to:
SUMMARYIf the contents of a list box exceed what the list box can display without scrolling, you can only scroll to the last item in the list. If the contents of the list box display entirely in the list box, scrolling down and past the last item cycles the highlight bar back up to the first item in the list.
MORE INFORMATIONThe scrolling behavior of a list box depends on the physical dimensions of the listbox. The following program demonstrates this behavior: *-- Instantiate a form based on custom form class, TestForm. frmMyForm = CREATEOBJECT("TestForm") frmMyForm.show READ EVENTS *-- Define a custom class based on the FORM baseclass. DEFINE CLASS TestForm AS FORM *-- Add list box to the form.
*-- Add command button to exit the program (form).
*-- Add custom code to the Init event of the form.
*-- Add custom code to the Click event of cmdQuit.
ENDDEFINE
*-- End custom class definition.
*-- End program.
Run this program. With the current Height property of the list box set to 110, there is not enough room in the list box to display the entire contents of the list box. Therefore, when you scroll down to the last item in the list box, the highlight bar stops on the last item. To demonstrate the cyclical scrolling behavior, edit the program and change the Height property of the list box to 120. Then Rerun the program. Scroll down in the list box and notice that when you reach the last item in the list, the highlight bar cycles back up to the first item and starts scrolling down again. Additional reference words: 3.00 VFoxWin KBCategory: kbprg kbcode KBSubcategory: FxprgUdwindow |
Last Reviewed: October 27, 1995 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |