Components | All | New | MacOS | Windows | Linux | iOS | ||||
Examples | Mac & Win | Server | Client | Guides | Statistic | FMM | Blog | Deprecated | Old |
MenuItem.SetFontSize
Sets the font size to use.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
Menu | 5.1 | ✅ Yes | ✅ Yes | ❌ No | ❌ No | ❌ No |
Parameters
Parameter | Description | Example |
---|---|---|
item | The reference to the menu item. Please create one with MenuItem.CreateMenuItem or MenuItem.CreateSeparator. | $item |
FontSize | The font size to use. Use 0 for default system font size. | 9 |
Result
Returns OK or error.
Description
Sets the font size to use.Examples
Creates a menu item with a font size:
Set Variable [$item; Value:MBS("MenuItem.CreateMenuItem"; "Font Size 20")]
Set Variable [$r; Value:MBS("MenuItem.SetFontSize"; $item; 20)]
Set Variable [$r; Value:MBS("Menu.AddItem"; $menu; $item)]
Loop over all menuitems in a menu and change font size:
While (
[
// get items in menu
items = MBS( "Menu.Items"; $menu );
index = 1;
count = MBS( "Menu.NumberOfItems"; $menu )
] ;
// loop till last item
index ≤ count ;
[
// get the current item
item = GetValue(items; index);
// change font size
r = MBS( "MenuItem.SetFontSize"; item; 16 );
// and continue with next item
index = index + 1
] ; 0 )
See also
- Menu.AddItem
- Menu.Items
- Menu.NumberOfItems
- MenuItem.CreateMenuItem
- MenuItem.CreateSeparator
- MenuItem.GetFontName
- MenuItem.GetFontSize
- MenuItem.SetFontColor
- MenuItem.SetFontName
Example Databases
Blog Entries
FileMaker Magazin
This function is free to use.
Created 11st May 2015, last changed 12nd March 2021
