Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Changing font size on Menu

Status
Not open for further replies.

safarijoe2000

Programmer
Jul 25, 2002
38
GB
Hello,

I would like to know if there is a way to change the font size on a Menu bar.

I am adapting an existing VFP system to become a touch-screen system. The only problem is that the font size on any of the Menu bar, are too small to actually properly selected using a touch-screen.

For example:
File Edit View .....
Cut
Paste
Copy
.....

Is there a way to change the font size ?

Thanks for any help.
 
safarijoe2000

You cannot by using the menu designer (I'm not sure it is possible with VFP8.0), but you can if you create your menu via code. Here is an example of different font sizes used in menus. Copy and paste this into a program and run it:

Code:
m.cMenuName = Sys(2015)
Local Array a_menupops[3]
a_menupops[1]="system"
a_menupops[2]="forms"
a_menupops[3]="help"
Define Menu (m.cMenuName) Bar
Define Pad _0ty0h5629 Of (m.cMenuName) Prompt "System" Color Scheme 3 ;
	KEY Alt+S, ""
Define Pad _0ty0h562a Of (m.cMenuName) Prompt "Forms" Color Scheme 3 ;
	KEY Alt+F, ""
Define Pad _0ty0h562b Of (m.cMenuName) Prompt "Help" Color Scheme 3 ;
	KEY Alt+H, ""
On Pad _0ty0h5629 Of (m.cMenuName) Activate Popup (a_menupops[1])
On Pad _0ty0h562a Of (m.cMenuName) Activate Popup (a_menupops[2])
On Pad _0ty0h562b Of (m.cMenuName) Activate Popup (a_menupops[3])
Define Popup (a_menupops[1]) Margin Relative Shadow Color Scheme 4
Define Bar 1 Of (a_menupops[1]) Prompt "Exit" Font "ARIAL",28
On Selection Bar 1 Of (a_menupops[1]) Quit
Define Popup (a_menupops[2]) Margin Relative Shadow Color Scheme 4
Define Bar 1 Of (a_menupops[2]) Prompt "Form #1" FONT "ARIAL" ,14 
Define Bar 2 Of (a_menupops[2]) Prompt "\-"
Define Bar 3 Of (a_menupops[2]) Prompt "Form #2"  FONT "ARIAL",30
Define Popup (a_menupops[3]) Margin Relative Shadow Color Scheme 4
Define Bar 1 Of (a_menupops[3]) Prompt "About" 
Activate Menu (m.cMenuName) Nowait


Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
You can specify the font for the menu items in the DEFINE POPUP line. The only problem is that the top menu line (like File, Edit, View... is unaffected and still uses the windows system font)

Code:
SET SYSMENU TO
SET SYSMENU AUTOMATIC

DEFINE PAD jsystem  OF _msysmenu PROMPT "System Options" COLOR SCHEME 10

ON PAD jsystem  OF _msysmenu ACTIVATE POPUP jsystem

DEFINE POPUP jsystem  MARGIN RELATIVE SHADOW COLOR SCHEME 10 FONT "Tahoma",10
DEFINE BAR  1 OF jsystem PROMPT " "
DEFINE BAR  2 OF jsystem PROMPT "\-"
DEFINE BAR  3 OF jsystem PROMPT &quot;\<1 - Update System Settings&quot;
DEFINE BAR  4 OF jsystem PROMPT &quot;\-&quot;
DEFINE BAR  5 OF jsystem PROMPT &quot;\<Quit&quot;

ACTIVATE MENU _msysmenu

Kaz
 
kazl

Looking at your code and mine, you may have noticed that you can use the font clause in the DEFINE BAR part of your code, which will affect the bar itself:
Code:
SET SYSMENU TO
SET SYSMENU AUTOMATIC

DEFINE PAD jsystem  OF _msysmenu PROMPT &quot;System Options&quot; COLOR SCHEME 10

ON PAD jsystem  OF _msysmenu ACTIVATE POPUP jsystem

DEFINE POPUP jsystem  MARGIN RELATIVE SHADOW COLOR SCHEME 10 FONT &quot;Tahoma&quot;,10
DEFINE BAR  1 OF jsystem PROMPT &quot; &quot;
DEFINE BAR  2 OF jsystem PROMPT &quot;\-&quot;
DEFINE BAR  3 OF jsystem PROMPT &quot;\<1 - Update System Settings&quot; FONT &quot;ARIAL&quot;,28
DEFINE BAR  4 OF jsystem PROMPT &quot;\-&quot;
DEFINE BAR  5 OF jsystem PROMPT &quot;\<Quit&quot;

ACTIVATE MENU _msysmenu


Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top