How Pictures Work with GET Fields and Proportional Fonts

Last reviewed: June 27, 1995
Article ID: Q103580
The information in this article applies to:
  • Microsoft FoxPro for Windows, versions 2.5 and 2.5a
  • Microsoft FoxPro for MS-DOS, versions 1.02, 2.0, 2.5, and 2.5a

All versions of FoxPro use a picture for editing GET fields. If one is not present, a default picture is created.

The precedence for the creation of this default picture is:

  1. Use any supplied picture (for example, the PICTURE clause)
2. Use the size of the database field associated with the GET 3. Use the size of the field (either explicitly specified
   with SIZE or implied from the size of the variable/field)

The picture controls the number of characters that can be entered in the field. For example, a user cannot enter more than four characters into a picture of XXXX, regardless of how this picture was derived.

This restriction becomes a particular problem for users of FoxPro for Windows when proportional fonts are used for the GET field. If the picture is derived from the size of the item (number 3 above), the number of characters that make up the derived picture is calculated from the average character width of the font. As a result, a GET field will be able to hold fewer "i" characters than it appears would be possible on the screen and, conversely, will appear to allow too many "W" characters (the field will scroll).

If controlling the exact number of characters that can be entered in a GET field is crucial, either:

  • Use an explicit PICTURE clause.

    -or-

  • Use a monospace (nonproportional) font (for example, Courier, FoxFont, and so on) for the GET field.


Additional reference words: FoxDos FoxWin 2.00 2.50 2.50a GET PROPORTIONAL
FONT
PICTURE SIZE
KBCategory: kbprg
KBSubcategory: FxprgGeneral


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: June 27, 1995
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.