Name | Type | Default |
disabled
|
Boolean
|
false
|
Enables or disables the jqxToolBar and all its tools.
<template> <JqxToolBar ref="myToolBar" :width="'70%'" :height="35" :tools="tools" :initTools="initTools" :disabled="true" /> </template>
<script> import JqxToolBar from 'jqwidgets-scripts/jqwidgets-vue/vue_jqxtoolbar.vue'; export default { components: { JqxToolBar }, data: function () { return { tools: 'button | dropdownlist combobox | input', initTools: function (type, index, tool, menuToolIninitialization) { switch (index) { case 0: tool.text( 'Button'); break; case 1: tool.jqxDropDownList({ width: 130, source: [ 'Affogato', 'Breve', 'Cafe', 'Crema'], selectedIndex: 1 }); break; case 2: tool.jqxComboBox({ width: 50, source: [8, 9, 10, 11, 12, 14, 16, 18, 20], selectedIndex: 3 }); break; case 3: tool.jqxInput({ width: 200, placeHolder: 'Type here...'
|
height
|
Number | String
|
35
|
Sets or gets the jqxToolBar's height.
<template> <JqxToolBar ref="myToolBar" :width="'70%'" :height="35" :tools="tools" :initTools="initTools" /> </template>
<script> import JqxToolBar from 'jqwidgets-scripts/jqwidgets-vue/vue_jqxtoolbar.vue'; export default { components: { JqxToolBar }, data: function () { return { tools: 'button | dropdownlist combobox | input', initTools: function (type, index, tool, menuToolIninitialization) { switch (index) { case 0: tool.text( 'Button'); break; case 1: tool.jqxDropDownList({ width: 130, source: [ 'Affogato', 'Breve', 'Cafe', 'Crema'], selectedIndex: 1 }); break; case 2: tool.jqxComboBox({ width: 50, source: [8, 9, 10, 11, 12, 14, 16, 18, 20], selectedIndex: 3 }); break; case 3: tool.jqxInput({ width: 200, placeHolder: 'Type here...'
|
initTools
|
Function
|
null
|
A callback function where settings can be made to the tools specified in the tools property. The initTools callback function is called twice for each tool. On the first call, the settings are applied to the tool as it appears in the toolbar. On the second call, the settings are applied to the tool when it is minimized. This allows the tool to appear differently in both cases if different settings are applied.
If you wish to disable the minimization of a tool, return { minimizable: false } in initTools . If you wish the tool to be minimizable but not to appear in the minimize pop-up menu, return { menuTool: false } . In these cases, there will only be one call of initTools for this tool.
initTools is passed four parameters:
type - the type of the tool, as specified in tools .
index
tool - a jQuery object representing the tool.
menuToolIninitialization - a boolean value, specifying whether initTools is called for the toolbar tool (false ) or the pop-up menu tool (true ).
<template> <JqxToolBar ref="myToolBar" :width="'70%'" :height="35" :tools="tools" :initTools="initTools" /> </template>
<script> import JqxToolBar from 'jqwidgets-scripts/jqwidgets-vue/vue_jqxtoolbar.vue'; export default { components: { JqxToolBar }, data: function () { return { tools: 'button | dropdownlist combobox | input', initTools: function (type, index, tool, menuToolIninitialization) { switch (index) { case 0: tool.text( 'Button'); break; case 1: tool.jqxDropDownList({ width: 130, source: [ 'Affogato', 'Breve', 'Cafe', 'Crema'], selectedIndex: 1 }); break; case 2: tool.jqxComboBox({ width: 50, source: [8, 9, 10, 11, 12, 14, 16, 18, 20], selectedIndex: 3 }); break; case 3: tool.jqxInput({ width: 200, placeHolder: 'Type here...'
|
minimizeWidth
|
Number
|
200
|
Sets or gets the width of the minimize pop-up menu.
<template> <JqxToolBar ref="myToolBar" :width="'70%'" :height="35" :tools="tools" :initTools="initTools" :minimizeWidth="400" /> </template>
<script> import JqxToolBar from 'jqwidgets-scripts/jqwidgets-vue/vue_jqxtoolbar.vue'; export default { components: { JqxToolBar }, data: function () { return { tools: 'button | dropdownlist combobox | input', initTools: function (type, index, tool, menuToolIninitialization) { switch (index) { case 0: tool.text( 'Button'); break; case 1: tool.jqxDropDownList({ width: 130, source: [ 'Affogato', 'Breve', 'Cafe', 'Crema'], selectedIndex: 1 }); break; case 2: tool.jqxComboBox({ width: 50, source: [8, 9, 10, 11, 12, 14, 16, 18, 20], selectedIndex: 3 }); break; case 3: tool.jqxInput({ width: 200, placeHolder: 'Type here...'
|
minWidth
|
Number
|
null
|
Sets or gets the minimum width of the jqxToolBar.
<template> <JqxToolBar ref="myToolBar" :width="'70%'" :height="35" :tools="tools" :initTools="initTools" :minWidth="300" /> </template>
<script> import JqxToolBar from 'jqwidgets-scripts/jqwidgets-vue/vue_jqxtoolbar.vue'; export default { components: { JqxToolBar }, data: function () { return { tools: 'button | dropdownlist combobox | input', initTools: function (type, index, tool, menuToolIninitialization) { switch (index) { case 0: tool.text( 'Button'); break; case 1: tool.jqxDropDownList({ width: 130, source: [ 'Affogato', 'Breve', 'Cafe', 'Crema'], selectedIndex: 1 }); break; case 2: tool.jqxComboBox({ width: 50, source: [8, 9, 10, 11, 12, 14, 16, 18, 20], selectedIndex: 3 }); break; case 3: tool.jqxInput({ width: 200, placeHolder: 'Type here...'
|
maxWidth
|
Number
|
null
|
Sets or gets the maximum width of the jqxToolBar.
<template> <JqxToolBar ref="myToolBar" :width="'70%'" :height="35" :tools="tools" :initTools="initTools" :maxWidth="900" /> </template>
<script> import JqxToolBar from 'jqwidgets-scripts/jqwidgets-vue/vue_jqxtoolbar.vue'; export default { components: { JqxToolBar }, data: function () { return { tools: 'button | dropdownlist combobox | input', initTools: function (type, index, tool, menuToolIninitialization) { switch (index) { case 0: tool.text( 'Button'); break; case 1: tool.jqxDropDownList({ width: 130, source: [ 'Affogato', 'Breve', 'Cafe', 'Crema'], selectedIndex: 1 }); break; case 2: tool.jqxComboBox({ width: 50, source: [8, 9, 10, 11, 12, 14, 16, 18, 20], selectedIndex: 3 }); break; case 3: tool.jqxInput({ width: 200, placeHolder: 'Type here...'
|
rtl
|
Boolean
|
false
|
Sets or gets a value indicating whether widget's elements are aligned to support locales using right-to-left fonts.
<template> <JqxToolBar ref="myToolBar" :width="'70%'" :height="35" :tools="tools" :initTools="initTools" :rtl="true" /> </template>
<script> import JqxToolBar from 'jqwidgets-scripts/jqwidgets-vue/vue_jqxtoolbar.vue'; export default { components: { JqxToolBar }, data: function () { return { tools: 'button | dropdownlist combobox | input', initTools: function (type, index, tool, menuToolIninitialization) { switch (index) { case 0: tool.text( 'Button'); break; case 1: tool.jqxDropDownList({ width: 130, source: [ 'Affogato', 'Breve', 'Cafe', 'Crema'], selectedIndex: 1 }); break; case 2: tool.jqxComboBox({ width: 50, source: [8, 9, 10, 11, 12, 14, 16, 18, 20], selectedIndex: 3 }); break; case 3: tool.jqxInput({ width: 200, placeHolder: 'Type here...'
|
tools
|
String
|
''
|
Sets or gets the types of tools in the jqxToolBar in the order they appear. The value of tools is a string representing a list of space-separated tool types. Possible tool types are: 'button', 'toggleButton', 'dropdownlist', 'combobox', 'input' and 'custom'. Separators can be added between tools by inserting a '|'.
<template> <JqxToolBar ref="myToolBar" :width="'70%'" :height="35" :tools="tools" :initTools="initTools" /> </template>
<script> import JqxToolBar from 'jqwidgets-scripts/jqwidgets-vue/vue_jqxtoolbar.vue'; export default { components: { JqxToolBar }, data: function () { return { tools: 'button | dropdownlist combobox | input', initTools: function (type, index, tool, menuToolIninitialization) { switch (index) { case 0: tool.text( 'Button'); break; case 1: tool.jqxDropDownList({ width: 130, source: [ 'Affogato', 'Breve', 'Cafe', 'Crema'], selectedIndex: 1 }); break; case 2: tool.jqxComboBox({ width: 50, source: [8, 9, 10, 11, 12, 14, 16, 18, 20], selectedIndex: 3 }); break; case 3: tool.jqxInput({ width: 200, placeHolder: 'Type here...'
|
theme
|
String
|
''
|
Sets the widget's theme.
<template> <JqxToolBar ref="myToolBar" :width="'70%'" :height="35" :tools="tools" :initTools="initTools" :theme="'material'" /> </template>
<script> import JqxToolBar from 'jqwidgets-scripts/jqwidgets-vue/vue_jqxtoolbar.vue'; export default { components: { JqxToolBar }, data: function () { return { tools: 'button | dropdownlist combobox | input', initTools: function (type, index, tool, menuToolIninitialization) { switch (index) { case 0: tool.text( 'Button'); break; case 1: tool.jqxDropDownList({ width: 130, source: [ 'Affogato', 'Breve', 'Cafe', 'Crema'], selectedIndex: 1 }); break; case 2: tool.jqxComboBox({ width: 50, source: [8, 9, 10, 11, 12, 14, 16, 18, 20], selectedIndex: 3 }); break; case 3: tool.jqxInput({ width: 200, placeHolder: 'Type here...'
|
width
|
Number | String
|
null
|
Sets or gets the jqxToolBar's width.
<template> <JqxToolBar ref="myToolBar" :width="'70%'" :height="35" :tools="tools" :initTools="initTools" /> </template>
<script> import JqxToolBar from 'jqwidgets-scripts/jqwidgets-vue/vue_jqxtoolbar.vue'; export default { components: { JqxToolBar }, data: function () { return { tools: 'button | dropdownlist combobox | input', initTools: function (type, index, tool, menuToolIninitialization) { switch (index) { case 0: tool.text( 'Button'); break; case 1: tool.jqxDropDownList({ width: 130, source: [ 'Affogato', 'Breve', 'Cafe', 'Crema'], selectedIndex: 1 }); break; case 2: tool.jqxComboBox({ width: 50, source: [8, 9, 10, 11, 12, 14, 16, 18, 20], selectedIndex: 3 }); break; case 3: tool.jqxInput({ width: 200, placeHolder: 'Type here...'
|
|
close
|
Event
|
|
This event is triggered when the minimize pop-up menu is closed.
Code examples
Bind to the close event of jqxToolBar.
<template> <JqxToolBar ref="myToolBar" @close="onClose($event)" :width="'70%'" :height="35" :tools="tools" :initTools="initTools" /> </template>
<script> import JqxToolBar from 'jqwidgets-scripts/jqwidgets-vue/vue_jqxtoolbar.vue'; export default { components: { JqxToolBar }, data: function () { return { tools: 'button | dropdownlist combobox | input', initTools: function (type, index, tool, menuToolIninitialization) { switch (index) { case 0: tool.text( 'Button'); break; case 1: tool.jqxDropDownList({ width: 130, source: [ 'Affogato', 'Breve', 'Cafe', 'Crema'], selectedIndex: 1 }); break; case 2: tool.jqxComboBox({ width: 50, source: [8, 9, 10, 11, 12, 14, 16, 18, 20], selectedIndex: 3 }); break; case 3: tool.jqxInput({ width: 200, placeHolder: 'Type here...' }); break; } } } }, mounted: function () { this.$refs.myToolBar.width = '30%'; }, methods: { onClose: function (event) { alert( 'do something...');
|
open
|
Event
|
|
This event is triggered when the minimize pop-up menu is opened.
Code examples
Bind to the open event of jqxToolBar.
<template> <JqxToolBar ref="myToolBar" @open="onOpen($event)" :width="'70%'" :height="35" :tools="tools" :initTools="initTools" /> </template>
<script> import JqxToolBar from 'jqwidgets-scripts/jqwidgets-vue/vue_jqxtoolbar.vue'; export default { components: { JqxToolBar }, data: function () { return { tools: 'button | dropdownlist combobox | input', initTools: function (type, index, tool, menuToolIninitialization) { switch (index) { case 0: tool.text( 'Button'); break; case 1: tool.jqxDropDownList({ width: 130, source: [ 'Affogato', 'Breve', 'Cafe', 'Crema'], selectedIndex: 1 }); break; case 2: tool.jqxComboBox({ width: 50, source: [8, 9, 10, 11, 12, 14, 16, 18, 20], selectedIndex: 3 }); break; case 3: tool.jqxInput({ width: 200, placeHolder: 'Type here...' }); break; } } } }, mounted: function () { this.$refs.myToolBar.width = '30%'; }, methods: { onOpen: function (event) { alert( 'do something...');
|
|
Name | Arguments | Return Type |
addTool
|
type, position, separator, menuToolIninitialization
|
None
|
Adds a tool to the jqxToolBar.
List of parameters:
- Type - the new tool's type. Possible values are: 'button', 'toggleButton', 'dropdownlist', 'combobox', 'input' and 'custom'.
- Position - where to insert the tool. Possible values are 'first' and 'last'.
- Separator - whether to include a separator after the new tool. Possible values are true and false.
- Initialization callback function - a function to be called after the new tool has been initialized. It is passed three parameters:
- type - the type of the tool.
- tool - a jQuery object representing the tool.
- menuToolIninitialization - a boolean value, specifying whether the callback is called for the toolbar tool (false) or the pop-up menu tool (true).
<template> <JqxToolBar ref="myToolBar" :width="'70%'" :height="35" :tools="tools" :initTools="initTools" /> </template>
<script> import JqxToolBar from 'jqwidgets-scripts/jqwidgets-vue/vue_jqxtoolbar.vue'; export default { components: { JqxToolBar }, data: function () { return { tools: 'button | dropdownlist combobox | input', initTools: function (type, index, tool, menuToolIninitialization) { switch (index) { case 0: tool.text( 'Button'); break; case 1: tool.jqxDropDownList({ width: 130, source: [ 'Affogato', 'Breve', 'Cafe', 'Crema'], selectedIndex: 1 }); break; case 2: tool.jqxComboBox({ width: 50, source: [8, 9, 10, 11, 12, 14, 16, 18, 20], selectedIndex: 3 }); break; case 3: tool.jqxInput({ width: 200, placeHolder: 'Type here...' }); break; } } } }, mounted: function () { this.$refs.myToolBar.addTool( 'button','last','', function (type, tool, menuToolIninitialization) {
|
disableTool
|
index, disable
|
None
|
Disables a tool.
List of parameters:
- Index - the tool's index.
- Disable - whether to disable or enable the tool. Possible values are true (disables the tool) and false (enables the tool).
<template> <JqxToolBar ref="myToolBar" :width="'70%'" :height="35" :tools="tools" :initTools="initTools" /> </template>
<script> import JqxToolBar from 'jqwidgets-scripts/jqwidgets-vue/vue_jqxtoolbar.vue'; export default { components: { JqxToolBar }, data: function () { return { tools: 'button | dropdownlist combobox | input', initTools: function (type, index, tool, menuToolIninitialization) { switch (index) { case 0: tool.text( 'Button'); break; case 1: tool.jqxDropDownList({ width: 130, source: [ 'Affogato', 'Breve', 'Cafe', 'Crema'], selectedIndex: 1 }); break; case 2: tool.jqxComboBox({ width: 50, source: [8, 9, 10, 11, 12, 14, 16, 18, 20], selectedIndex: 3 }); break; case 3: tool.jqxInput({ width: 200, placeHolder: 'Type here...' }); break; } } } }, mounted: function () { this.$refs.myToolBar.disableTool(1,true);
|
destroy
|
None
|
None
|
Destroys the toolbar and all its tools.
<template> <JqxToolBar ref="myToolBar" :width="'70%'" :height="35" :tools="tools" :initTools="initTools" /> </template>
<script> import JqxToolBar from 'jqwidgets-scripts/jqwidgets-vue/vue_jqxtoolbar.vue'; export default { components: { JqxToolBar }, data: function () { return { tools: 'button | dropdownlist combobox | input', initTools: function (type, index, tool, menuToolIninitialization) { switch (index) { case 0: tool.text( 'Button'); break; case 1: tool.jqxDropDownList({ width: 130, source: [ 'Affogato', 'Breve', 'Cafe', 'Crema'], selectedIndex: 1 }); break; case 2: tool.jqxComboBox({ width: 50, source: [8, 9, 10, 11, 12, 14, 16, 18, 20], selectedIndex: 3 }); break; case 3: tool.jqxInput({ width: 200, placeHolder: 'Type here...' }); break; } } } }, mounted: function () { this.$refs.myToolBar.destroy();
|
destroyTool
|
index
|
None
|
Destroys a tool.
<template> <JqxToolBar ref="myToolBar" :width="'70%'" :height="35" :tools="tools" :initTools="initTools" /> </template>
<script> import JqxToolBar from 'jqwidgets-scripts/jqwidgets-vue/vue_jqxtoolbar.vue'; export default { components: { JqxToolBar }, data: function () { return { tools: 'button | dropdownlist combobox | input', initTools: function (type, index, tool, menuToolIninitialization) { switch (index) { case 0: tool.text( 'Button'); break; case 1: tool.jqxDropDownList({ width: 130, source: [ 'Affogato', 'Breve', 'Cafe', 'Crema'], selectedIndex: 1 }); break; case 2: tool.jqxComboBox({ width: 50, source: [8, 9, 10, 11, 12, 14, 16, 18, 20], selectedIndex: 3 }); break; case 3: tool.jqxInput({ width: 200, placeHolder: 'Type here...' }); break; } } } }, mounted: function () { this.$refs.myToolBar.destroyTool(1);
|
getTools
|
None
|
Array
|
Returns an array of all tools in the jqxToolBar.
Each tool is represented by an object with the following fields:
type - string. Returns the type of the tool.
tool - object. Returns a jQuery object representing the tool.
separatorAfterWidget - boolean. Returns whether there is a separator after the tool.
minimizable - boolean. Returns whether the tool is minimizable.
minimized - boolean. Returns whether the tool is currently minimized.
menuTool - object. Returns a jQuery object representing the minimized tool in the pop-up menu. If the minimized tool is disabled, returns false .
menuSeparator - object. Returns a jQuery object representing the separator after the minimized tool in the pop-up menu. If there is no separator after the tool, returns false .
<template> <JqxToolBar ref="myToolBar" :width="'70%'" :height="35" :tools="tools" :initTools="initTools" /> </template>
<script> import JqxToolBar from 'jqwidgets-scripts/jqwidgets-vue/vue_jqxtoolbar.vue'; export default { components: { JqxToolBar }, data: function () { return { tools: 'button | dropdownlist combobox | input', initTools: function (type, index, tool, menuToolIninitialization) { switch (index) { case 0: tool.text( 'Button'); break; case 1: tool.jqxDropDownList({ width: 130, source: [ 'Affogato', 'Breve', 'Cafe', 'Crema'], selectedIndex: 1 }); break; case 2: tool.jqxComboBox({ width: 50, source: [8, 9, 10, 11, 12, 14, 16, 18, 20], selectedIndex: 3 }); break; case 3: tool.jqxInput({ width: 200, placeHolder: 'Type here...' }); break; } } } }, mounted: function () { const value = this.$refs.myToolBar.getTools();
|
render
|
None
|
None
|
Renders the widget.
<template> <JqxToolBar ref="myToolBar" :width="'70%'" :height="35" :tools="tools" :initTools="initTools" /> </template>
<script> import JqxToolBar from 'jqwidgets-scripts/jqwidgets-vue/vue_jqxtoolbar.vue'; export default { components: { JqxToolBar }, data: function () { return { tools: 'button | dropdownlist combobox | input', initTools: function (type, index, tool, menuToolIninitialization) { switch (index) { case 0: tool.text( 'Button'); break; case 1: tool.jqxDropDownList({ width: 130, source: [ 'Affogato', 'Breve', 'Cafe', 'Crema'], selectedIndex: 1 }); break; case 2: tool.jqxComboBox({ width: 50, source: [8, 9, 10, 11, 12, 14, 16, 18, 20], selectedIndex: 3 }); break; case 3: tool.jqxInput({ width: 200, placeHolder: 'Type here...' }); break; } } } }, mounted: function () { this.$refs.myToolBar.render();
|
refresh
|
None
|
None
|
Refreshes the widget.
<template> <JqxToolBar ref="myToolBar" :width="'70%'" :height="35" :tools="tools" :initTools="initTools" /> </template>
<script> import JqxToolBar from 'jqwidgets-scripts/jqwidgets-vue/vue_jqxtoolbar.vue'; export default { components: { JqxToolBar }, data: function () { return { tools: 'button | dropdownlist combobox | input', initTools: function (type, index, tool, menuToolIninitialization) { switch (index) { case 0: tool.text( 'Button'); break; case 1: tool.jqxDropDownList({ width: 130, source: [ 'Affogato', 'Breve', 'Cafe', 'Crema'], selectedIndex: 1 }); break; case 2: tool.jqxComboBox({ width: 50, source: [8, 9, 10, 11, 12, 14, 16, 18, 20], selectedIndex: 3 }); break; case 3: tool.jqxInput({ width: 200, placeHolder: 'Type here...' }); break; } } } }, mounted: function () { this.$refs.myToolBar.refresh();
|