How to Implement a Customized Scrolling GET List ControlID: Q121437 2.00 2.5x 2.60 2.60a | 2.5x 2.60 2.60a
The information in this article applies to:
SUMMARYFoxPro does not provide any built-in means of creating a specialized scrolling control like the one used in the Modify Structure dialog box or the one used in the RQBE tool. It is possible, however, to simulate such a control by using a series of nested windows. The sample code below illustrates this process.
MORE INFORMATIONNOTE: Save this code as SCROLLER.PRG. To execute the code, type "DO scroller.prg" in the Command window.
Sample Code*------------------------------------------------------------------------- * * SCROLLER.PRG - Sample code for implementing a simple specialized list * Various environmental initializations...
* Define container window.
* Define the container for the scrolled region. Window B will
* limit the visibility of the scrolling chunk of screen, and
* window C will actually be relocated on the screen as the
* scrolling buttons are pressed.
* Define the container for the control buttons and other
* GET objects on the screen. In order to be able to access
* controls in both the container and the scrollable region,
* the controls must be at the same level of window-nesting.
* Initialize button variables.
* Draw the buttons.
* Define the controls on the scrolling region.
* Create <num_items> buttons and GETs.
* (This is also an example of a control array.)
*-------------------------------------------------------------------------
PROCEDURE scrollit
* Use the Move Window command to position the scroll area
*-------------------------------------------------------------------------
PROCEDURE enablescroll
* Disable or enable the scroll buttons as appropriate.
*-------------------------------------------------------------------------
PROCEDURE scrbtn
*-------------------------------------------------------------------------
PROCEDURE scrtxt
*
*
* End of program SCROLLER.PRG
*-------------------------------------------------------------------------
Additional reference words: FoxDos FoxWin 2.00 2.5x 2.50 2.5 2.5a 2.50a 2.5b 2.50b 2.60 2.60a control array get list getlist scroll bar scrollbar KBCategory: kbui KBSubcategory: FxtoolRqbe
|
|
Last Reviewed: May 22, 1998 © 1999 Microsoft Corporation. All rights reserved. Terms of Use. |