Microsoft KB Archive/109156

{| = PRB: List Box for Logical Field Has Highlight at Bottom =
 * width="100%"|

ID: Q109156

2.50 2.50a 2.50b | 2.00 2.50 2.50a 2.50b

WINDOWS         | MS-DOS kbprg kbprb The information in this article applies to:


 * Microsoft FoxPro for Windows, versions 2.5, 2.5a, and 2.5b
 * Microsoft FoxPro for MS-DOS, versions 2.0, 2.5, 2.5a, and 2.5b

SYMPTOMS
In the list box for a logical field, the highlight either appears at the bottom of the list or doesn't appear at all.

CAUSE
List boxes created from logical fields must have the variable initialized in the Screen Setup code, and it must be initialized to a character (usually an "F" or "T") other than " ". If the variable is set to " " or not set at all, the selection highlight either will appear at the bottom of the list or will not appear at all.

RESOLUTION
Initialize a variable for the logical field in the Screen Setup code and make sure you initialize the variable to a character. For example, if you initialize the list box variable as "T" in the Screen Setup code, the list box highlight will appear at the top of the list.

Steps to Reproduce Behavior
1. Issue the USE command on a database with a logical field.

2. Create a screen using the Screen Builder.

3. Create a list box. (In FoxPro for Windows, click the List box tool on

the toolbox; in FoxPro for MS-DOS, choose List from the Screen menu.) 4. In FoxPro for Windows, select From Field under List Items and enter the  name of the logical field. In FoxPro for MS-DOS, select Prompt Field   under List Type and enter the name of the logical field. 5. Enter a variable name. 6. Choose OK, and generate the screen.

7. Issue the DO command to run the screen.

The selection highlight either will appear at the bottom of the list box or will not appear at all.

Additional reference words: FoxDos FoxWin 2.00 2.50 2.50a 2.50b listbox KBCategory: kbprg kbprb KBSubcategory: FxtoolSbuilder

Keywords         : FxtoolSbuilder Version          : 2.50 2.50a 2.50b | 2.00 2.50 2.5 Platform         : MS-DOS WINDOWS
 * }