ID: Q169516
The information in this article applies to:
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.
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 : kbcode FoxWin FxprgGeneral
Version : 2.5 2.5a 2.5b 2.6 2.6a
Platform : WINDOWS
Issue type : kbhowto
Last Reviewed: June 4, 1997