PRB: "&" in Controls Does Not Work as ExpectedID: Q103682 The information in this article applies to:
SYMPTOMSThe ampersand (&) character will not display in some controls and instead will show the next character as being underlined. For example, the following procedure works differently in FoxPro for Windows and FoxPro for MS-DOS: 1. In a new screen, add a popup object. In the Popup Prompts box, type 2. As soon as you assign a variable name and choose OK, you will see
If you select "This _That" so that it drops down, you will then see
"This & That" as well as the other correctly displayed prompts.
However, as soon as you select a prompt, its display will return to
being an underscore and no space instead of the &.
The same result occurs in FoxPro versions 2.5 and 2.5a for Windows. This behavior does not affect any version of FoxPro for MS-DOS.
CAUSEThis behavior occurs because of a limitation of the Windows environment. Similar behavior will be exhibited in other Windows-based applications such as Visual Basic. This behavior is by design, and changing this behavior would make FoxPro for Windows behave in a manner inconsistent with other Windows-based applications.
RESOLUTIONTo display an ampersand character in Windows, use a double ampersand (&&). In some cases, you can use the following procedure: 1. In the Screen Setup Code snippet, type:
2. In the Popup Prompts box for the list box control, type "&myvar"
Additional reference words: FoxWin 2.50 2.50a listbox
KBCategory: kbprg kbprb
KBSubcategory: FxprgGeneral
|
|
Last Reviewed: June 27, 1995 © 1999 Microsoft Corporation. All rights reserved. Terms of Use. |