Child pages
  • ToolBar

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}
\\ 

{table:id=|class=servoy sSummary}{colgroup}{column:padding=0px|width=80px}{column}{column}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=2}Method Summary{th}{tr}{tbody}{tr}{td}void{td}{td}[#addButton]\(text, method, \[arguments\], \[icon\], \[tooltip\], \[enabled\], \[visible\])
Add a Button to the toolbar.{td}{tr}{tbody}{tbody}{tr}{td}void{td}{td}[#addCheckBox]\(text, method, \[selected\], \[tooltip\], \[enabled\], \[visible\])
Add a CheckBox to the toolbar.{td}{tr}{tbody}{tbody}{tr}{td}void{td}{td}[#addComboBox]\(method, index, input, \[tooltip\], \[enabled\], \[visible\])
Add a ComboBox to the toolbar.{td}{tr}{tbody}{tbody}{tr}{td}void{td}{td}[#addField]\(method, text, \[tooltip\], \[enabled\], \[visible\])
Add a Field to the toolbar.{td}{tr}{tbody}{tbody}{tr}{td}void{td}{td}[#addSeparator]\()
Add a Separator to the toolbar.{td}{tr}{tbody}{tbody}{tr}{td}void{td}{td}[#enableItem]\()
{td}{tr}{tbody}{tbody}{tr}{td}void{td}{td}[#removeAllItems]\()
Remove all Buttons, Checkboxes etc.{td}{tr}{tbody}{tbody}{tr}{td}void{td}{td}[#removeItem]\(index)
Remove a Button, CheckBox, ComboBox from the toolbar.{td}{tr}{tbody}{tbody}{tr}{td}void{td}{td}[#selectCheckBox]\(index, boolean)
Set the CheckBox selection.{td}{tr}{tbody}{tbody}{tr}{td}void{td}{td}[#selectComboBox]\(index, rowindex)
Select a row of the ComboBox via the index.{td}{tr}{tbody}{tbody}{tr}{td}void{td}{td}[#setFieldText]\(index, text)
Set a (default) text of the field at the given index.{td}{tr}{tbody}{tbody}{tr}{td}void{td}{td}[#visibleItem]\()
{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=addButton|class=node}{tr:id=name}{td}h6.addButton{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}void{span}{span:id=iets|style=float: left; font-weight: bold;}addButton{span}{span:id=iets|style=float: left;}\(text, method, \[arguments\], \[icon\], \[tooltip\], \[enabled\], \[visible\]){span}{td}{tr}{tr:id=des}{td}Add a Button to the toolbar.{td}{tr}{tr:id=snc}{td}*Since*\\ Replace with version info{td}{tr}{tr:id=prs}{td}*Parameters*\\text
method
\[arguments\]
\[icon\]
\[tooltip\]
\[enabled\]
\[visible\]
{td}{tr}{tr:id=ret}{td}*Returns*\\void{td}{tr}{tr:id=seesam}{td}*Also seeSample*\\{div:class=sIndent}{div}{td}{tr}{tr:id=link}{td}*External links*\\{div:class=sIndent}{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
// get the toolbar at the panel by name
var toolbar = code:language=javascript}
// get the toolbar at the panel by name
var toolbar = plugins.window.getToolBar("toolbar_0");

// add a button with a text and a method
toolbar.addButton("button", feedback_button);

// add an input array to the button for feedback in the selected method
toolbar.addButton("button", feedback_button, [1, "2", "three"]);

// add an icon to the button
toolbar.addButton("button", feedback_button, [1, "2", "three"], "media:///yourimage.gif");

// add a tooltip to the button
toolbar.addButton("button", feedback_button, [1, "2", "three"], "media:///yourimage.gif", "tooltip.");

// show only an icon on the button and disable the button
toolbar.addButton(null, feedback_button, [1, "2", "three"], "media:///yourimage.gif", "tooltip.", false);

// add a separator
toolbar.addSeparator();

// make the button non visible
toolbar.addButton(null, feedback_button, [1, "2", "three"], "media:///yourimage.gif", "tooltip.",true, false);

// and validate the changes
// to make them know to the user interface)
toolbar.validate();
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=addCheckBox|class=node}{tr:id=name}{td}h6.addCheckBox{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}void{span}{span:id=iets|style=float: left; font-weight: bold;}addCheckBox{span}{span:id=iets|style=float: left;}\(text, method, \[selected\], \[tooltip\], \[enabled\], \[visible\]){span}{td}{tr}{tr:id=des}{td}Add a CheckBox to the toolbar.{td}{tr}{tr:id=sncprs}{td}*SinceParameters*\\text
Replace with version info{td}{tr}{tr:id=prs}{td}*Parameters*\\text
method
\[selected\]
\[tooltip\]
\[method
\[selected\]
\[tooltip\]
\[enabled\]
\[visible\]
{td}{tr}{tr:id=ret}{td}*Returns*\\void{td}{tr}{tr:id=seesam}{td}*Also seeSample*\\{div:class=sIndent}{div}{td}{tr}{tr:id=link}{td}*External links*\\{div:class=sIndent}{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
// add a toolbar with a code:language=javascript}
// add a toolbar with a name and internal name
var toolbar = plugins.window.addToolBar("toolbar_1", "toolbar_1");

// add a checkbox with a text and a method
toolbar.addCheckBox("checkbox", feedback_button);

// add an checkbox and set it's state to selected (not selected by default)
toolbar.addCheckBox("checkbox", feedback_button, true);

// add a tooltip to the checkbox
toolbar.addCheckBox("checkbox", feedback_button, false, "tooltip");

// add a separator
toolbar.addSeparator();

// disable the checkbox and select it
toolbar.addCheckBox("checkbox", feedback_button, true, "tooltip",false);

// make the button non visible
toolbar.addCheckBox("checkbox", feedback_button, false, "tooltip",false, false);

// and validate the changes
// to make them know to the user interface)
toolbar.validate();
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=addComboBox|class=node}{tr:id=name}{td}h6.addComboBox{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}void{span}{span:id=iets|style=float: left; font-weight: bold;}addComboBox{span}{span:id=iets|style=float: left;}\(method, index, input, \[tooltip\], \[enabled\], \[visible\]){span}{td}{tr}{tr:id=des}{td}Add a ComboBox to the toolbar.{td}{tr}{tr:id=snc}{td}*Since*\\ Replace with version info{td}{tr}{tr:id=prs}{td}*Parameters*\\method
index
input
\[tooltip\]
\[enabled\]
\[visible\]
{td}{tr}{tr:id=ret}{td}*Returns*\\void{td}{tr}{tr:id=seesam}{td}*Also seeSample*\\{div:class=sIndent}{div}{td}{tr}{tr:id=link}{td}*External links*\\{div:class=sIndent}{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:code:language=javascript}
// add a toolbar with a name and internal name at the given row index
var toolbar = plugins.window.addToolBar("toolbar_2", "toolbar_2", 3);

// add a combobox with the attached method, selected index and input (list) array
toolbar.addComboBox(feedback_button, 0, ["input","array","combobox",1]);

// add a tooltip to the combobox
toolbar.addComboBox(feedback_button, 1, ["input","array","combobox",2], "tooltip");

// add a separator
toolbar.addSeparator();

// disable the combobox
toolbar.addComboBox(feedback_button, 2, ["input","array","combobox",3], "tooltip",false);

// make the combobox non visible
toolbar.addComboBox(feedback_button, 3, ["input","array","combobox",4], "tooltip",false, false);

// and validate the changes
// to make them know to the user interface)
toolbar.validate();
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=addField|class=node}{tr:id=name}{td}h6.addField{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}void{span}{span:id=iets|style=float: left; font-weight: bold;}addField{span}{span:id=iets|style=float: left;}\(method, text, \[tooltip\], \[enabled\], \[visible\]){span}{td}{tr}{tr:id=des}{td}Add a Field to the toolbar.{td}{tr}{tr:id=sncprs}{td}*SinceParameters*\\method
Replace with version info{td}{tr}{tr:id=prs}{td}*Parameters*\\method
text
\[tooltip\]
\[enabled\]
\[text
\[tooltip\]
\[enabled\]
\[visible\]
{td}{tr}{tr:id=ret}{td}*Returns*\\void{td}{tr}{tr:id=seesam}{td}*Also seeSample*\\{div:class=sIndent}{div}{td}{tr}{tr:id=link}{td}*External links*\\{div:class=sIndent}{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
// add a toolbar with a code:language=javascript}
// add a toolbar with a name and internal name at the given row index
var toolbar = plugins.window.addToolBar("toolbar_3", "toolbar_3", 4);

// add a field with the attached method and a default text
toolbar.addField(feedback_button, null);

// add a separator
toolbar.addSeparator();

// set the length of the field. 
// default length = 8 when length is not set or set to 0
toolbar.addField(feedback_button, "field", 0, "tooltip");

// add a separator
toolbar.addSeparator();

// add a tooltip to the field
toolbar.addField(feedback_button, "field", 10, "tooltip");

// add a separator
toolbar.addSeparator();

// disable the field
toolbar.addField(feedback_button, null, 5, "tooltip",false);

// add a separator
toolbar.addSeparator();

// make the field non visible
toolbar.addField(feedback_button, "field", 0, "tooltip",false, false);

// and validate the changes
// to make them know to the user interface)
toolbar.validate();
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=addSeparator|class=node}{tr:id=name}{td}h6.addSeparator{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}void{span}{span:id=iets|style=float: left; font-weight: bold;}addSeparator{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}Add a Separator to the toolbar.{td}{tr}{tr:id=sncret}{td}*SinceReturns*\\ Replace with version infovoid{td}{tr}{tr:id=prssam}{td}*ParametersSample*\\{tddiv:class=sIndent}{tr}{tr:id=ret}{td}*Returns*\\void{td}{tr}{tr:id=see}{td}*Also see*\\{div:class=sIndent}{div}{td}{tr}{tr:id=link}{td}*External links*\\{div:class=sIndent}{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
// get the toolbar at the panel by name
var toolbar = plugins.window.code:language=javascript}
// get the toolbar at the panel by name
var toolbar = plugins.window.getToolBar("toolbar_0");

// add a button with a text and a method
toolbar.addButton("button", feedback_button);

// add an input array to the button for feedback in the selected method
toolbar.addButton("button", feedback_button, [1, "2", "three"]);

// add an icon to the button
toolbar.addButton("button", feedback_button, [1, "2", "three"], "media:///yourimage.gif");

// add a tooltip to the button
toolbar.addButton("button", feedback_button, [1, "2", "three"], "media:///yourimage.gif", "tooltip.");

// show only an icon on the button and disable the button
toolbar.addButton(null, feedback_button, [1, "2", "three"], "media:///yourimage.gif", "tooltip.", false);

// add a separator
toolbar.addSeparator();

// make the button non visible
toolbar.addButton(null, feedback_button, [1, "2", "three"], "media:///yourimage.gif", "tooltip.",true, false);

// and validate the changes
// to make them know to the user interface)
toolbar.validate();
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=enableItem|class=node}{tr:id=name}{td}h6.enableItem{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}void{span}{span:id=iets|style=float: left; font-weight: bold;}enableItem{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}Replace with description{td}{tr}{tr:id=sncret}{td}*SinceReturns*\\ Replace with version info{td}{void{td}{tr}{tr:id=prssam}{td}*Parameters*\\{td}{tr}{tr:id=ret}{td}*Returns*\\void{td}{tr}{tr:id=see}{td}*Also seeSample*\\{div:class=sIndent}{div}{td}{tr}{tr:id=link}{td}*External links*\\{div:class=sIndent}{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
// get code:language=javascript}
// get the toolbar at the panel by name
var toolbar = plugins.window.getToolBar("toolbar_1");

// enable/disable the selected item at the index
// REMARK: the pitfall here is that the indexes start at position 1 here
// position 0 is reserved for the toolbar handle!
toolbar.enableItem(1, false);
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=removeAllItems|class=node}{tr:id=name}{td}h6.removeAllItems{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}void{span}{span:id=iets|style=float: left; font-weight: bold;}removeAllItems{span}{span:id=iets|style=float: left;}\(){span false);
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=removeAllItems|class=node}{tr:id=desname}{td}Remove all Buttons, Checkboxes etc. from the toolbar.}h6.removeAllItems{td}{tr}{tr:id=sncsig}{td}*Since*\\ Replace with version info{td}{tr}{tr:id=prs}{td}*Parameters*\\{td}{tr}{tr:id=ret}{td}*Returns*\\void{span:style=float: left; margin-right: 5px;}void{span}{span:id=iets|style=float: left; font-weight: bold;}removeAllItems{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=seedes}{td}*Also see*\\{div:class=sIndent}{div}Remove all Buttons, Checkboxes etc. from the toolbar.{td}{tr}{tr:id=linkret}{td}*External linksReturns*\\{div:class=sIndent}{div}{void{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
// get the toolbar at the panel by name
var toolbar = plugins.window.getToolBar("toolbar_0");

// remove all buttons from the toolbar
toolbar.removeAllItems();
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=removeItem|class=node}{tr:id=name}{td}h6.removeItem{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}void{span}{span:id=iets|style=float: left; fontmargin-weightright: bold5px;}removeItemvoid{span}{span:id=iets|style=float: left;}\(index){span}{td}{tr}{tr:id=des}{td}Remove a Button, CheckBox, ComboBox from the toolbar.{td}{tr}{tr:id=snc}{td}*Since*\\ Replace with version info{td}{tr}{tr:id=prs}{td}*Parameters*\\index
 font-weight: bold;}removeItem{span}{span:id=iets|style=float: left;}\(index){span}{td}{tr}{tr:id=retdes}{td}*Returns*\\voidRemove a Button, CheckBox, ComboBox from the toolbar.{td}{tr}{tr:id=seeprs}{td}*Also seeParameters*\\{div:class=sIndent}{div}{index
{td}{tr}{tr:id=linkret}{td}*External linksReturns*\\{div:class=sIndent}{div}void{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
// get the toolbar at the panel by name
var toolbar = plugins.window.getToolBar("toolbar_0");

// remove the button, checkbox, combobox, separator or field from the toolbar
// REMARK: the pitfall here is that the indexes start at position 1 here
// position 0 is reserved for the toolbar handle!
toolbar.removeItem(1);

// and validate the changes
// to make them know to the user interface)
toolbar.validate();
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=selectCheckBox|class=node}{tr:id=name}{td}h6.selectCheckBox{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}void{span}{span:id=iets|style=float: left; font-weight: bold;}selectCheckBox{span}{span:id=iets|style=float: left;}\(index, boolean){span}{td}{tr}{tr:id=des}{td}Set the CheckBox selection.{td}{tr}{tr:id=snc}{td}*Since*\\ Replace with version info{td}{tr}{tr:id=prs}{td}*Parameters*\\index
boolean
 bold;}selectCheckBox{span}{span:id=iets|style=float: left;}\(index, boolean){span}{td}{tr}{tr:id=retdes}{td}*Returns*\\voidSet the CheckBox selection.{td}{tr}{tr:id=seeprs}{td}*Also seeParameters*\\{div:class=sIndent}{div}{index
boolean
{td}{tr}{tr:id=link}{td}*External links*\\{div:class=sIndent}{div}=ret}{td}*Returns*\\void{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
// get the toolbar at the panel by name
var toolbar = plugins.window.getToolBar("toolbar_1");

// set the selection of the checkbox at the index
// REMARK: the pitfall here is that the indexes start at position 1 here
// position 0 is reserved for the toolbar handle!
toolbar.selectCheckBox(1, false);
toolbar.selectCheckBox(2, true);
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=selectComboBox|class=node}{tr:id=name}{td}h6.selectComboBox{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}void{span}{span:id=iets|style=float: left; font-weight: bold;}selectComboBox{span}{span:id=iets|style=float: left;}\(index, rowindex){span}{td}{tr}{tr:id=des}{td}Select a row of the ComboBox via the index.{td}{tr}{tr:id=snc}{td}*Since*\\ Replace with version info{td}{tr}{tr:id=prs}{td}*Parameters*\\index
rowindex
{td}{tr}{tr:id=ret}{td}*Returns*\\void index.{td}{tr}{tr:id=seeprs}{td}*Also seeParameters*\\{div:class=sIndent}{div}{index
rowindex
{td}{tr}{tr:id=linkret}{td}*External linksReturns*\\{div:class=sIndent}{div}{void{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
// get the toolbar at the panel by name
var toolbar = plugins.window.getToolBar("toolbar_2");

// set the selection of the combobox at the index
// REMARK: the pitfall here is that the indexes start at position 1 here
// position 0 is reserved for the toolbar handle!
toolbar.selectComboBox(1, 0);
toolbar.selectComboBox(2, 0);
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=setFieldText|class=node}{tr:id=name}{td}h6.setFieldText{code}{div}{td}{tr}{tr:id=sigclass=lastDetailRow}{td}{td}{span:style=float: left; margin-right: 5px;}void{span}{spantr}{tbody}{tbody:id=ietssetFieldText|style=float: left; font-weight: bold;}setFieldText{span}{span:id=iets|style=float: left;}\(index, text){span}class=node}{tr:id=name}{td}h6.setFieldText{td}{tr}{tr:id=dessig}{td}Set a (default) text of the field at the given index.{td}{tr}{tr:id=snc}{td}*Since*\\ Replace with version info{td}{tr}{tr:id=prs}{td}*Parameters*\\index
text
{span:style=float: left; margin-right: 5px;}void{span}{span:id=iets|style=float: left; font-weight: bold;}setFieldText{span}{span:id=iets|style=float: left;}\(index, text){span}{td}{tr}{tr:id=retdes}{td}*Returns*\\voidSet a (default) text of the field at the given index.{td}{tr}{tr:id=seeprs}{td}*Also seeParameters*\\{div:class=sIndent}{div}{index
text
{td}{tr}{tr:id=linkret}{td}*External linksReturns*\\{div:class=sIndent}{div}void{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
// get the toolbar at the panel by name
var toolbar = plugins.window.getToolBar("toolbar_3");

// set the text of the field at the index
// REMARK: the pitfall here is that the indexes start at position 1 here
// position 0 is reserved for the toolbar handle!
toolbar.setFieldText(1, "new text 1");
toolbar.setFieldText(2, "new text 2");
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=visibleItem|class=node}{tr:id=name}{td}h6.visibleItem{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}void{span}{span:id=iets|style=float: left; font-weight: bold;}visibleItem{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}Replace with description{td}{tr}{tr:id=snc}{td}*Since*\\ Replace with version info{td}{tr}{tr:id=prs}{td}*Parameters*\\{td}{tr}{tr:id=ret}{td}*Returns*\\void: bold;}visibleItem{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=seedes}{td}*Also see*\\{div:class=sIndent}{div}{Replace with description{td}{tr}{tr:id=linkret}{td}*External linksReturns*\\{div:class=sIndent}{div}void{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
// get the toolbar at the panel by name
var toolbar = plugins.window.getToolBar("toolbar_2");

// make the selected item at the index visible/invisible
// REMARK: the pitfall here is that the indexes start at position 1 here
// position 0 is reserved for the toolbar handle!
toolbar.visibleItem(1, false);
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{table}