The information in this article applies to:
- Microsoft FoxPro for MS-DOS, versions 2.6 and 2.6a
- Microsoft FoxPro for Unix, versions 2.6
SYMPTOMS
In both FoxPro for MS-DOS and FoxPro for Unix, when you place a list box on
a screen, the items in the list box are not highlighted until an item is
selected from the list box.
WORKAROUND
Using the KEYBOARD command in conjunction with a variable that is evaluated
in the WHEN clause of the list box object, have FoxPro highlight the first
item in the list box to provide a visual indicator to the user that they
are in a specific list box. See the More Information section for details.
STATUS
This behavior is by design.
MORE INFORMATION
Steps to Reproduce Behavior
- In FoxPro for MS-DOS or UNIX, issue these commands:
SET DEFAULT TO SYS(2004)+"\TUTORIAL"
USE CUSTOMER in 1
- Issue this command:
CREATE SCREEN listtest
- Choose Screen from the Layout menu.
- Select the Window radio button, and name the screen LISTTEST
in the Name box.
- Select the Screen Code, Setup check box.
- In the LISTTEST Setup code snippet, place this command:
TRIGGERED = .F.
- Close the setup code screen.
- Back in LISTTEST.SCX, choose Screen, List.
- In the List Type box, choose Prompt Field. In the Field box,
type in Company.
- In the Variable box, type in the value LIST1.
- In the When clause of the list box, type the following as a procedure:
IF (!Triggered)
KEYBOARD "{Home}"+"{Home}"
Triggered = .T.
ENDIF
- Choose the OK button. Back in the List Type dialog, choose OK a second
time.
- Choose Program, Generate from the FoxPro menu. When asked if you want
to save the environment information, choose Yes.
- Choose Program, Do from the FoxPro menu. Select LISTTEST.SPR from the
list of programs.
- Your screen should show one list box with the first item in the list
highlighted.
|