LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

how to change menu bar font programmatically

Hi all,
 
I want to change the font and the font size of a menu bar programmatically. Therefore I thought I should use the following function:
<<SetMenuBarAttribute (panelMenuBarHandle, Menu_FILE, ATTR_MENU_BAR_FONT, VAL_EDITOR_META_FONT);>>
and the same for changing the size.
 
But I get permanent error (return value -46, the attribute passed is not valid). Changing size and font in the user interface editor and saving changes in the uir-file is no problem!
 
Any suggestions?
 
Thanks for your help.
0 Kudos
Message 1 of 4
(3,685 Views)

Forgot to inform you about the version of CVI: it's 8.0.1 on a Win2K system.

0 Kudos
Message 2 of 4
(3,671 Views)
I believe that you can only change the font for the whole menu bar, so perhaps it would be better to pass 0 as the second parameter rather than Menu_FILE.
--
Martin
Certified CVI Developer
0 Kudos
Message 3 of 4
(3,665 Views)

That's it - thanks Martin!

0 Kudos
Message 4 of 4
(3,659 Views)