HOWTO: Changing a Pop-up's Font to Non-Proportional in FoxPro

Last reviewed: June 3, 1997
Article ID: Q169516
The information in this article applies to:
  • Microsoft FoxPro for Windows, versions 2.5, 2.5a, 2.5b, 2.6, 2.6a

SUMMARY

Sometimes a user may want to change a popup window's font to be a fixed size in FoxPro for Windows. This can be done by using the following command:

   MODIFY WINDOW SCREEN FONT 'Foxfont',9

If you do not use this command, items in the pop-up window appear in proportional fonts and may not line up properly.

MORE INFORMATION

Create a program called Sizefont.prg and type in the following code. This demonstrates an instance where the pop-up bars do not line up directly above one another.

   CLEAR
   DEFINE WINDOW output from 2,1 to 13,75 TITLE 'Output' FONT "COURIER", 9
   ACTIVATE WINDOW output
   DEFINE POPUP Test
   * This bar does not line up with the other bars
   DEFINE BAR 1 of Test PROMPT "iiiii 1"
   DEFINE BAR 2 of Test PROMPT "WWWWW 2"
   DEFINE BAR 3 of Test PROMPT "..... 3"
   ON SELECTION POPUP Test DEACTIVATE POPUP Test
   ACTIVATE POPUP Test
   RETURN

If you make this change, the popup bars are aligned under each other with the "i", "W", and "." all taking an equal amount of space:

   CLEAR
   *The following line has been changed to FoxFont
   DEFINE WINDOW output from 2,1 to 13,75 TITLE 'Output' FONT "FoxFont", 9
   ACTIVATE WINDOW output
   DEFINE POPUP Test
   DEFINE BAR 1 of Test PROMPT "iiiii 1"
   DEFINE BAR 2 of Test PROMPT "WWWWW 2"
   DEFINE BAR 3 of Test PROMPT "..... 3"
   ON SELECTION POPUP Test DEACTIVATE POPUP Test
   ACTIVATE POPUP Test
   RETURN
 

	
	


Keywords : foxwin FxprgGeneral kbcode
Version : 2.5 2.5a 2.5b 2.6 2.6a
Platform : WINDOWS
Issue type : kbhowto


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 3, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.