Functions
There are two ways to view the CNS Menu function reference, the Function Reference below, and the Function Reference Browser in a new window.
Function ReferenceThe Function Reference is a complete reference for CNS Menu functions. Click on a function title to view more information which includes the function description, parameter information, example usage and more. | Function Reference Browser![]() The Function Reference Browser offers better navigation for the CNS Menu functions, you can Launch Function Browser in a new window. |
Function Reference
- CNSMenu_Configure
Calling this function with no parameters will open the CNS Menu Configuration Dialog. You can optionally open to a specific tab by specifying the name of the tab as the "Option" parameter. This... read more
- CNSMenu_DefineMenu
This is the main menu definition function. This function takes your XML menu definitions, parses them, and sets up menus to be displayed. For a complete understanding of this function, please see... read more
- CNSMenu_DefineMenuFile
This function is similar to the CNSMenu_DefineMenu function, except that instead of defining the actual XML text, you sepecify a file on the hard drive containing the XML text. The XML file you... read more
- CNSMenu_DefineQuickMenu
This function allows you to easily create a menu without using... read more
- CNSMenu_DeleteMenu
This function will delete a previously defined menu. Specify the name of the menu to delete as the... read more
- CNSMenu_File_GetPath
You can use this function to return the complete path to a special folder on the local hard... read more
- CNSMenu_GetMenuChoice
This function will return the name or caption of the last menu item the user selected. If you have more than one menu item calling the same script in your database, you can use this function to... read more
- CNSMenu_GetMenuName
This function will return the name of the menu that contains the menu item that the user last selected. If you have more than one menu set up to call the same script in your database, you can use... read more
- CNSMenu_GetMenuValue
This function will return the user-defined value of the last selected menu item. When defining your menu items, you can specify any data you want, and then that menu item is selected, you can use... read more
- CNSMenu_GetMouseButton
This function will return a number to indicate which mouse button was last clicked. If you click on a button with the left mouse button, this function will return "1". If you click with the right... read more
- CNSMenu_GetMouseCoordinates
This function retuns the cordinates of the mouse. The optional parameters are "layout" and "screen". The "layout" parameter returns the cordinates of the mouse in relation to the layout, and the... read more
- CNSMenu_ListMenus
This function returns a list of all the currently defined... read more
- CNSMenu_PopupMenuErrors
This function enables or disables Popup dialogs that display menu errors. If a menu item does not have a database or script associated with it, and none of its parent items do, then when the user... read more
- CNSMenu_Register
You can use this function to Register the plug-in from a script instead of through the Configuration Dialog. This is useful when the plug-in is being distributed to many computers, allowing you to... read more
- CNSMenu_SetLayoutPartHeights
To properly display menus at specific pixel locations on layouts set to "List View", you need to let the plug-in know the heights of the Layout Parts of your layout. Once you have set these values,... read more
- CNSMenu_ShowMenu
Use this function to show a previously defined menu. You can have the menu popup at the current mouse coordinates, or you can specify where the popup menu should appear. If you want the menu to popup... read more
- CNSMenu_Version
This function returns the current version of CNS Menu. This function is useful for testing whether or not the plug-in is installed and enabled. If you call this function and a question mark ("?")... read more
- CNSMenu_VersionAutoUpdate
This function returns an Auto Update friendly Version number of CNS Menu. The format of this version number is always exactly 8 digits long. The first two digits represent the major version of the... read more
- XML: CNSMenu Tag
This is the Root Tag of the CNS Menu XML documents. It is the equivalent of the <HTML> tag in HTML documents. The only tags that can appear inside the root <CNSMenu> tag are the... read more
- XML: deletemenuitem Tag
This tag allows you to delete a menu item from any menu you have previously defined. This tag is used by itself and does not need to appear within <menu> or <submenu> tags. You need to at... read more
- XML: insertmenu Tag
This tag allows you to insert any menu into another menu when that menu is displayed. The menu you are inserting does not have to be defined when you define the parent menu (the one you are inserting... read more
- XML: insertmenuitem Tag
This tag allows you to insert a new menu item into any menu you have previously defined. The <insertmenuitem> tag is useful for creating menus based on records in a portal. This tag is used by... read more
- XML: menu Tag
This tag is the main tag for all menu definitions. You need to define at least the name attribute to have a valid <menu> tag. This tag can contain <menuitem>, <submenu>, and... read more
- XML: menuitem Tag
This tag is used to define a single item on the menu or submenu. You need to at least define the name attribute to have a valid <menuitem> tag. This is an empty tag, so you can either use a... read more
- XML: submenu Tag
This tag defines a submenu of the current menu. You can use this tag to create heiarchial menus. You need to define at least the name attribute to have a valid <submenu> tag. This tag can... read more
- XML: updatemenuitem Tag
This tag allows you to update the attributes of any menu item on any menu you have previously defined. The <updatemenuitem> tag is useful for enabling a previously disabled menu item (or vice... read more
