Topics   All   Mac OS X (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server (Not)   Client   Old   Guides   Examples
New in version: 6.2   6.3   6.4   6.5   7.0   7.1   7.2   7.3   7.4   7.5    Statistic  

Menu.DefineQuickMenuXML

Defines a menu based on a xml description.

Component Version macOS Windows Server FileMaker Cloud FileMaker iOS SDK
Menu 5.2 Yes Yes No No No

MBS( "Menu.DefineQuickMenuXML"; XML )

Parameters

Parameter Description Example value
XML The description XML.

Result

Returns menu reference or error.

Description

Defines a menu based on a xml description.
The xml has a root entry called "menu". Each menu entry can have attributes title, tag, groupID, scriptname, filename and modifierkeys. A menu can have subnodes of name menu or item. The item can have attributes title, tag, scriptname, filename, tag, enabled, selectable, Separator, mark, style, GroupID or modifierkeys.

Modifierkeys can include shift, control, option or command.
Mark can include mixed, bullet, diamond or checked.
Style can include bold, italic or underline.
If an item has name "-" or Separator=1 attribute, the plugin will mark it as being a separator.

If the root menu entry has a name, we can use that name as menu reference.

Examples

Defines a quick menu with XML:

MBS( "Menu.DefineQuickMenuXML"; "<menu name=\"menue\">
        <menuitem name=\"Red\" value=\"1\" />
        <menuitem name=\"Blue\" value=\"2\" />
        <menuitem name=\"Yellow\" value=\"3\" />
</menu>" )

Define a menu with submenus:

MBS( "Menu.DefineQuickMenuXML"; "<menu name=\"menue\">
        <submenu name=\"Warm Colors\">
            <menuitem name=\"Red\" value=\"1\" />
            <menuitem name=\"Blue\" value=\"2\" />
            <menuitem name=\"Yellow\" value=\"3\" />
        </submenu>
        <submenu name=\"Cool Colors\">
            <menuitem name=\"Blue\" value=\"4\" />
            <menuitem name=\"Green\" value=\"5\" />
            <menuitem name=\"Purple\" value=\"6\" />
        </submenu>
</menu>\")" )

See also

Example Databases


Menu.DefineQuickMenu   -   Menu.FindItemWithTag

Feedback: Report problem or ask question.




Links
MBS FileMaker Plugins