Child pages
  • MenuBar

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Wiki Markup
{hidden}
DO NOT EDIT THE CONTENT OF THIS PAGE DIRECTLY, UNLESS YOU KNOW WHAT YOU'RE DOING.
		THE STRUCTURE OF THE CONTENT IS VITAL IN BEING ABLE TO EXTRACT CHANGES FROM THE PAGE AND MERGE THEM BACK INTO SERVOY SOURCE{hidden}
{sub-section:description|text=}{sub-section}\\ 

{table:id=|class=servoy sSummery}{colgroup}{column:padding=0px|width=80px}{column}{column}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=2}Method Summery{th}{tr}{tbody}{tr}{td}[Menu]{td}{td}[#addMenu]\(\[index\])
Add the menu at the selected index (starting at 0) or add it at the end (empty).{td}{tr}{tbody}{tbody}{tr}{td}[Menu]{td}{td}[#getMenu]\(index)
Get the menu at the selected index (starting at 0).{td}{tr}{tbody}{tbody}{tr}{td}[Number]{td}{td}[#getMenuCount]\()
Get the number of (top level) menu's.{td}{tr}{tbody}{tbody}{tr}{td}[Number]{td}{td}[#getMenuIndexByText]\(menuName)
Retrieve the index of the item by text.{td}{tr}{tbody}{tbody}{tr}{td}void{td}{td}[#removeAllMenus]\()
Remove all menus from the menubar.{td}{tr}{tbody}{tbody}{tr}{td}void{td}{td}[#removeMenu]\(index 1, \[index 2-n\])
Remove the menu(s) at the selected index/indices.{td}{tr}{tbody}{tbody}{tr}{td}void{td}{td}[#reset]\()
Reset the menubar to the default.{td}{tr}{tbody}{tbody}{tr}{td}void{td}{td}[#setVisible]\(visible)
Show/hide the menu bar{td}{tr}{tbody}{tbody}{tr}{td}void{td}{td}[#validate]\()
Use this when your add/remove/edit operation won't refresh.{td}{tr}{tbody}{table}\\ 

{table:id=function|class=servoy sDetail}{colgroup}{column:padding=0px|width=100%}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=1}Method Details{th}{tr}{tbody:id=addMenu|class=node}{tr:id=name}{td}h6.addMenu{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Menu]{span}{span:id=iets|style=float: left; font-weight: bold;}addMenu{span}{span:id=iets|style=float: left;}\(\[index\]){span}{td}{tr}{tr:id=des}{td}{sub-section:addMenu_des|text=|trigger=button}{sub-section}{sub-section:addMenu_des|trigger=none|class=sIndent}Add the menu at the selected index (starting at 0) or add it at the end (empty).{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:addMenu_snc|text=|trigger=button}{sub-section}{sub-section:addMenu_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:addMenu_prs|text=|trigger=button}{sub-section}{sub-section:addMenu_prs|trigger=none|class=sIndent}\[index\]
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:addMenu_ret|text=|trigger=button}{sub-section}{sub-section:addMenu_ret|trigger=none|class=sIndent}[Menu]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:addMenu_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:addMenu_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:addMenu_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:addMenu_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:addMenu_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:addMenu_sam|trigger=none}{code:language=javascript}
// Note: method addMenu only works in the smart client.

// Add the menu at the selected index (starting at 0) or add it at the end (empty).
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getMenu|class=node}{tr:id=name}{td}h6.getMenu{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Menu]{span}{span:id=iets|style=float: left; font-weight: bold;}getMenu{span}{span:id=iets|style=float: left;}\(index){span}{td}{tr}{tr:id=des}{td}{sub-section:getMenu_des|text=|trigger=button}{sub-section}{sub-section:getMenu_des|trigger=none|class=sIndent}Get the menu at the selected index (starting at 0).{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:getMenu_snc|text=|trigger=button}{sub-section}{sub-section:getMenu_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:getMenu_prs|text=|trigger=button}{sub-section}{sub-section:getMenu_prs|trigger=none|class=sIndent}index
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:getMenu_ret|text=|trigger=button}{sub-section}{sub-section:getMenu_ret|trigger=none|class=sIndent}[Menu]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:getMenu_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getMenu_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:getMenu_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getMenu_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:getMenu_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getMenu_sam|trigger=none}{code:language=javascript}
// Note: method getMenu only works in the smart client.

// Get the menu at the selected index (starting at 0).
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getMenuCount|class=node}{tr:id=name}{td}h6.getMenuCount{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Number]{span}{span:id=iets|style=float: left; font-weight: bold;}getMenuCount{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:getMenuCount_des|text=|trigger=button}{sub-section}{sub-section:getMenuCount_des|trigger=none|class=sIndent}Get the number of (top level) menu's.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:getMenuCount_snc|text=|trigger=button}{sub-section}{sub-section:getMenuCount_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:getMenuCount_prs|text=|trigger=button}{sub-section}{sub-section:getMenuCount_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:getMenuCount_ret|text=|trigger=button}{sub-section}{sub-section:getMenuCount_ret|trigger=none|class=sIndent}[Number]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:getMenuCount_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getMenuCount_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:getMenuCount_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getMenuCount_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:getMenuCount_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getMenuCount_sam|trigger=none}{code:language=javascript}
// Note: method getMenuCount only works in the smart client.

// Get the number of (top level) menu's.
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getMenuIndexByText|class=node}{tr:id=name}{td}h6.getMenuIndexByText{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Number]{span}{span:id=iets|style=float: left; font-weight: bold;}getMenuIndexByText{span}{span:id=iets|style=float: left;}\(menuName){span}{td}{tr}{tr:id=des}{td}{sub-section:getMenuIndexByText_des|text=|trigger=button}{sub-section}{sub-section:getMenuIndexByText_des|trigger=none|class=sIndent}Retrieve the index of the item by text.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:getMenuIndexByText_snc|text=|trigger=button}{sub-section}{sub-section:getMenuIndexByText_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:getMenuIndexByText_prs|text=|trigger=button}{sub-section}{sub-section:getMenuIndexByText_prs|trigger=none|class=sIndent}menuName
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:getMenuIndexByText_ret|text=|trigger=button}{sub-section}{sub-section:getMenuIndexByText_ret|trigger=none|class=sIndent}[Number]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:getMenuIndexByText_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getMenuIndexByText_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:getMenuIndexByText_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getMenuIndexByText_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:getMenuIndexByText_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:getMenuIndexByText_sam|trigger=none}{code:language=javascript}
// Note: method getMenuIndexByText only works in the smart client.

// Retrieve the index of the item by text.
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=removeAllMenus|class=node}{tr:id=name}{td}h6.removeAllMenus{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}void{span}{span:id=iets|style=float: left; font-weight: bold;}removeAllMenus{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:removeAllMenus_des|text=|trigger=button}{sub-section}{sub-section:removeAllMenus_des|trigger=none|class=sIndent}Remove all menus from the menubar.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:removeAllMenus_snc|text=|trigger=button}{sub-section}{sub-section:removeAllMenus_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:removeAllMenus_prs|text=|trigger=button}{sub-section}{sub-section:removeAllMenus_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:removeAllMenus_ret|text=|trigger=button}{sub-section}{sub-section:removeAllMenus_ret|trigger=none|class=sIndent}void{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:removeAllMenus_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:removeAllMenus_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:removeAllMenus_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:removeAllMenus_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:removeAllMenus_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:removeAllMenus_sam|trigger=none}{code:language=javascript}
// Note: method removeAllMenus only works in the smart client.

// Remove all menus from the menubar.
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=removeMenu|class=node}{tr:id=name}{td}h6.removeMenu{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}void{span}{span:id=iets|style=float: left; font-weight: bold;}removeMenu{span}{span:id=iets|style=float: left;}\(index 1, \[index 2-n\]){span}{td}{tr}{tr:id=des}{td}{sub-section:removeMenu_des|text=|trigger=button}{sub-section}{sub-section:removeMenu_des|trigger=none|class=sIndent}Remove the menu(s) at the selected index/indices.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:removeMenu_snc|text=|trigger=button}{sub-section}{sub-section:removeMenu_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:removeMenu_prs|text=|trigger=button}{sub-section}{sub-section:removeMenu_prs|trigger=none|class=sIndent}index 1
\[index 2\-n\]
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:removeMenu_ret|text=|trigger=button}{sub-section}{sub-section:removeMenu_ret|trigger=none|class=sIndent}void{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:removeMenu_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:removeMenu_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:removeMenu_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:removeMenu_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:removeMenu_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:removeMenu_sam|trigger=none}{code:language=javascript}
// Note: method removeMenu only works in the smart client.

// Remove the menu(s) at the selected index/indices.
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=reset|class=node}{tr:id=name}{td}h6.reset{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}void{span}{span:id=iets|style=float: left; font-weight: bold;}reset{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:reset_des|text=|trigger=button}{sub-section}{sub-section:reset_des|trigger=none|class=sIndent}Reset the menubar to the default.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:reset_snc|text=|trigger=button}{sub-section}{sub-section:reset_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:reset_prs|text=|trigger=button}{sub-section}{sub-section:reset_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:reset_ret|text=|trigger=button}{sub-section}{sub-section:reset_ret|trigger=none|class=sIndent}void{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:reset_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:reset_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:reset_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:reset_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:reset_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:reset_sam|trigger=none}{code:language=javascript}
// Note: method reset only works in the smart client.

// Reset the menubar to the default.
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=setVisible|class=node}{tr:id=name}{td}h6.setVisible{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}void{span}{span:id=iets|style=float: left; font-weight: bold;}setVisible{span}{span:id=iets|style=float: left;}\(visible){span}{td}{tr}{tr:id=des}{td}{sub-section:setVisible_des|text=|trigger=button}{sub-section}{sub-section:setVisible_des|trigger=none|class=sIndent}Show/hide the menu bar{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:setVisible_snc|text=|trigger=button}{sub-section}{sub-section:setVisible_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:setVisible_prs|text=|trigger=button}{sub-section}{sub-section:setVisible_prs|trigger=none|class=sIndent}visible
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:setVisible_ret|text=|trigger=button}{sub-section}{sub-section:setVisible_ret|trigger=none|class=sIndent}void{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:setVisible_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:setVisible_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:setVisible_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:setVisible_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:setVisible_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:setVisible_sam|trigger=none}{code:language=javascript}
// Note: method setVisible only works in the smart client.

// Show/hide the menu bar
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=validate|class=node}{tr:id=name}{td}h6.validate{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}void{span}{span:id=iets|style=float: left; font-weight: bold;}validate{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}{sub-section:validate_des|text=|trigger=button}{sub-section}{sub-section:validate_des|trigger=none|class=sIndent}Use this when your add/remove/edit operation won't refresh.{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:validate_snc|text=|trigger=button}{sub-section}{sub-section:validate_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:validate_prs|text=|trigger=button}{sub-section}{sub-section:validate_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:validate_ret|text=|trigger=button}{sub-section}{sub-section:validate_ret|trigger=none|class=sIndent}void{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:validate_see|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:validate_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:validate_link|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:validate_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:validate_sam|text=|trigger=button}{sub-section}{div:class=sIndent}{sub-section:validate_sam|trigger=none}{code:language=javascript}
// Note: method validate only works in the smart client.

// Use this when your add/remove/edit operation won't refresh.
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{table}