Microsoft KB Archive/103580

From BetaArchive Wiki

How Pictures Work with GET Fields and Proportional Fonts

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

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