|
|
|
Tip #36 - LISTBOX and @KEYF Using Listbox can off a choice of selections to the user that can be easy to use. First create an array and load the possibilities in the array. Our array will be used to select the forms available to be printed from Daily Input. The forms are created and may have processing that would have the same name as the form. 88 ------- - - - - - - - - - - - - - - - - If: Then: items("1")="invoice";items("2")="order";items("3")="statsh" 89 - - - - - - - - - - - - - - - - - - - - - - - - - - If: Then: fx(2,.0)=listbox(items) 90 ------- - - - - - - - - - - - - - - - - If: fx ge "1" and fx le "3" Then: fr=items(fx){"";call fr This calls to a process table which collects the information that is printed on the form Then does a FORM "invoice" (if invoice is the form selected) to print the proper form. When the END is executed in the called table it will return to this spot in the logic. This assumes that you will always have a process table that will handle the form and processing. If you want to use this logic in a situation where the process existance is iffy, use the EXISTS() function to make sure the process exists before executing a CALL. 91 ------- - - - - - - - - - - - - - - - -If: Then: end LISTBOX has the nice feature that typing the initial letter of the selection will move the cursor to that selection. There are many options to help customize the LISTBOX. LISTBOX ( arrayname, first_element, last_element, row, column, height, width, initial_highlight )
For example, LISTBOX (items, "2","10",,,"10","40") - display elements 2 to 10 of array called "items" in a box 10 high and 40 wide. Screen location is up to filePro. LISTBOX (items, , , "5","10") - display the listbox array called items, with the upper left corner at (5,10) on the screen. Written by Nancy Palmquist at nlp@vss3.com Copyright, 2003 by Virtual Software Systems. All rights reserved.
|