Components | All | New | MacOS | Windows | Linux | iOS | ||||
Examples | Mac & Win | Server | Client | Guides | Statistic | FMM | Blog | Deprecated | Old |
MenuItem.SetFontName
Sets the font name to use.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
Menu | 5.1 | ✅ Yes | ✅ Yes | ❌ No | ❌ No | ❌ No |
MBS( "MenuItem.SetFontName"; item; FontName { ; FontSize } ) More
(old name: MenuItem.ApplyFont)
Parameters
Parameter | Description | Example | Flags |
---|---|---|---|
item | The reference to the menu item. Please create one with MenuItem.CreateMenuItem or MenuItem.CreateSeparator. | $item | |
FontName | The font name to use. | "Arial" | |
FontSize | The font size to use. Use 0 for default system font size. | 9 | Optional |
Result
Returns OK or error.
Description
Sets the font name to use.Leave empty for system font.
Examples
Create a menu entry with specific font:
Set Variable [$item; Value:MBS("MenuItem.CreateMenuItem"; "With Comic Sans Font")]
Set Variable [$r; Value:MBS("MenuItem.SetFontName"; $item; "Comic Sans MS"; 13)]
Set Variable [$r; Value:MBS("Menu.AddItem"; $menu; $item)]
See also
- Menu.AddItem
- MenuItem.CreateMenuItem
- MenuItem.CreateSeparator
- MenuItem.GetFontName
- MenuItem.GetFontSize
- MenuItem.SetFontColor
- MenuItem.SetFontSize
- MenuItem.SetState
Blog Entries
FileMaker Magazin
This function is free to use.
Created 11st May 2015, last changed 1st October 2016