Name | Type | Default |
---|---|---|
disabled | boolean | false |
Enables or disables the jqxToolBar and all its tools. /* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import JqxToolBar, { IToolBarProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxtoolbar'; class App extends React.PureComponent<{}, IToolBarProps> { private myToolBar = React.createRef<JqxToolBar>(); constructor(props: {}) { super(props); this.state = { 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; } } } } public render() { return ( <JqxToolBar ref={this.myToolBar} width={'70%'} height={35} tools={this.state.tools} initTools={this.state.initTools} disabled={true} /> ); } } ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement); |
||
height | string | number | 35 |
Sets or gets the jqxToolBar's height. /* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import JqxToolBar, { IToolBarProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxtoolbar'; class App extends React.PureComponent<{}, IToolBarProps> { private myToolBar = React.createRef<JqxToolBar>(); constructor(props: {}) { super(props); this.state = { 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; } } } } public render() { return ( <JqxToolBar ref={this.myToolBar} width={'70%'} height={35} tools={this.state.tools} initTools={this.state.initTools} /> ); } } ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement); |
||
initTools | (type?: string, index?: number, tool?: any, menuToolIninitialization?: boolean) => void | null |
A callback function where settings can be made to the tools specified in the If you wish to disable the minimization of a tool, return
/* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import JqxToolBar, { IToolBarProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxtoolbar'; class App extends React.PureComponent<{}, IToolBarProps> { private myToolBar = React.createRef<JqxToolBar>(); constructor(props: {}) { super(props); this.state = { 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; } } } } public render() { return ( <JqxToolBar ref={this.myToolBar} width={'70%'} height={35} tools={this.state.tools} initTools={this.state.initTools} /> ); } } ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement); |
||
minimizeWidth | number | 200 |
Sets or gets the width of the minimize pop-up menu. /* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import JqxToolBar, { IToolBarProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxtoolbar'; class App extends React.PureComponent<{}, IToolBarProps> { private myToolBar = React.createRef<JqxToolBar>(); constructor(props: {}) { super(props); this.state = { 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; } } } } public render() { return ( <JqxToolBar ref={this.myToolBar} width={'70%'} height={35} tools={this.state.tools} initTools={this.state.initTools} minimizeWidth={400} /> ); } } ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement); |
||
minWidth | number | string | null |
Sets or gets the minimum width of the jqxToolBar. /* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import JqxToolBar, { IToolBarProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxtoolbar'; class App extends React.PureComponent<{}, IToolBarProps> { private myToolBar = React.createRef<JqxToolBar>(); constructor(props: {}) { super(props); this.state = { 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; } } } } public render() { return ( <JqxToolBar ref={this.myToolBar} width={'70%'} height={35} tools={this.state.tools} initTools={this.state.initTools} minWidth={300} /> ); } } ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement); |
||
maxWidth | number | string | null |
Sets or gets the maximum width of the jqxToolBar. /* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import JqxToolBar, { IToolBarProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxtoolbar'; class App extends React.PureComponent<{}, IToolBarProps> { private myToolBar = React.createRef<JqxToolBar>(); constructor(props: {}) { super(props); this.state = { 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; } } } } public render() { return ( <JqxToolBar ref={this.myToolBar} width={'70%'} height={35} tools={this.state.tools} initTools={this.state.initTools} maxWidth={900} /> ); } } ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement); |
||
rtl | boolean | false |
Sets or gets a value indicating whether widget's elements are aligned to support locales using right-to-left fonts. /* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import JqxToolBar, { IToolBarProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxtoolbar'; class App extends React.PureComponent<{}, IToolBarProps> { private myToolBar = React.createRef<JqxToolBar>(); constructor(props: {}) { super(props); this.state = { 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; } } } } public render() { return ( <JqxToolBar ref={this.myToolBar} width={'70%'} height={35} tools={this.state.tools} initTools={this.state.initTools} rtl={true} /> ); } } ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement); |
||
tools | string | 'button' | 'toggleButton' | 'dropdownlist' | 'combobox' | 'input' | 'custom' | '' |
Sets or gets the types of tools in the jqxToolBar in the order they appear. The value of /* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import JqxToolBar, { IToolBarProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxtoolbar'; class App extends React.PureComponent<{}, IToolBarProps> { private myToolBar = React.createRef<JqxToolBar>(); constructor(props: {}) { super(props); this.state = { 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; } } } } public render() { return ( <JqxToolBar ref={this.myToolBar} width={'70%'} height={35} tools={this.state.tools} initTools={this.state.initTools} /> ); } } ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement); |
||
theme | string | '' |
/* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import JqxToolBar, { IToolBarProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxtoolbar'; class App extends React.PureComponent<{}, IToolBarProps> { private myToolBar = React.createRef<JqxToolBar>(); constructor(props: {}) { super(props); this.state = { 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; } } } } public render() { return ( <JqxToolBar ref={this.myToolBar} width={'70%'} height={35} tools={this.state.tools} initTools={this.state.initTools} theme={'material'} /> ); } } ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement); |
||
width | string | number | null |
Sets or gets the jqxToolBar's width. /* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import JqxToolBar, { IToolBarProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxtoolbar'; class App extends React.PureComponent<{}, IToolBarProps> { private myToolBar = React.createRef<JqxToolBar>(); constructor(props: {}) { super(props); this.state = { 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; } } } } public render() { return ( <JqxToolBar ref={this.myToolBar} width={'70%'} height={35} tools={this.state.tools} initTools={this.state.initTools} /> ); } } ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement); |
||
Events |
||
close | Event | |
This event is triggered when the minimize pop-up menu is closed. Code examples
Bind to the
/* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import JqxToolBar, { IToolBarProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxtoolbar'; class App extends React.PureComponent<{}, IToolBarProps> { private myToolBar = React.createRef<JqxToolBar>(); constructor(props: {}) { super(props); this.state = { 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; } } } } public componentDidMount(): void { this.myToolBar.current!.setOptions({ width: '30%' }); } public render() { return ( <JqxToolBar ref={this.myToolBar} onClose={this.onClose} width={'70%'} height={35} tools={this.state.tools} initTools={this.state.initTools} /> ); } private onClose(e: Event): void { alert('do something...'); } } ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement); |
||
open | Event | |
This event is triggered when the minimize pop-up menu is opened. Code examples
Bind to the
/* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import JqxToolBar, { IToolBarProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxtoolbar'; class App extends React.PureComponent<{}, IToolBarProps> { private myToolBar = React.createRef<JqxToolBar>(); constructor(props: {}) { super(props); this.state = { 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; } } } } public componentDidMount(): void { this.myToolBar.current!.setOptions({ width: '30%' }); } public render() { return ( <JqxToolBar ref={this.myToolBar} onOpen={this.onOpen} width={'70%'} height={35} tools={this.state.tools} initTools={this.state.initTools} /> ); } private onOpen(e: Event): void { alert('do something...'); } } ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement); |
||
Methods |
||
Name | Arguments | Return Type |
addTool | type, position, separator, menuToolIninitialization | |
Adds a tool to the jqxToolBar. List of parameters:
/* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import JqxToolBar, { IToolBarProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxtoolbar'; class App extends React.PureComponent<{}, IToolBarProps> { private myToolBar = React.createRef<JqxToolBar>(); constructor(props: {}) { super(props); this.state = { 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; } } } } public componentDidMount(): void { this.myToolBar.current!.addTool('button','last','',function (type, tool, menuToolIninitialization) { tool.text("New button"); tool.jqxButton({ width: 170 }); }); } public render() { return ( <JqxToolBar ref={this.myToolBar} width={'70%'} height={35} tools={this.state.tools} initTools={this.state.initTools} /> ); } } ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement); |
||
disableTool | index, disable | |
Disables a tool. List of parameters:
/* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import JqxToolBar, { IToolBarProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxtoolbar'; class App extends React.PureComponent<{}, IToolBarProps> { private myToolBar = React.createRef<JqxToolBar>(); constructor(props: {}) { super(props); this.state = { 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; } } } } public componentDidMount(): void { this.myToolBar.current!.disableTool(1,true); } public render() { return ( <JqxToolBar ref={this.myToolBar} width={'70%'} height={35} tools={this.state.tools} initTools={this.state.initTools} /> ); } } ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement); |
||
destroy | None | |
Destroys the toolbar and all its tools. /* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import JqxToolBar, { IToolBarProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxtoolbar'; class App extends React.PureComponent<{}, IToolBarProps> { private myToolBar = React.createRef<JqxToolBar>(); constructor(props: {}) { super(props); this.state = { 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; } } } } public componentDidMount(): void { this.myToolBar.current!.destroy(); } public render() { return ( <JqxToolBar ref={this.myToolBar} width={'70%'} height={35} tools={this.state.tools} initTools={this.state.initTools} /> ); } } ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement); |
||
destroyTool | index | |
Destroys a tool. /* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import JqxToolBar, { IToolBarProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxtoolbar'; class App extends React.PureComponent<{}, IToolBarProps> { private myToolBar = React.createRef<JqxToolBar>(); constructor(props: {}) { super(props); this.state = { 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; } } } } public componentDidMount(): void { this.myToolBar.current!.destroyTool(1); } public render() { return ( <JqxToolBar ref={this.myToolBar} width={'70%'} height={35} tools={this.state.tools} initTools={this.state.initTools} /> ); } } ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement); |
||
getTools | None | |
Returns an array of all tools in the jqxToolBar. Each tool is represented by an object with the following fields:
/* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import JqxToolBar, { IToolBarProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxtoolbar'; class App extends React.PureComponent<{}, IToolBarProps> { private myToolBar = React.createRef<JqxToolBar>(); constructor(props: {}) { super(props); this.state = { 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; } } } } public componentDidMount(): void { this.myToolBar.current!.getTools(); } public render() { return ( <JqxToolBar ref={this.myToolBar} width={'70%'} height={35} tools={this.state.tools} initTools={this.state.initTools} /> ); } } ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement); |
||
render | None | |
Renders the widget. /* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import JqxToolBar, { IToolBarProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxtoolbar'; class App extends React.PureComponent<{}, IToolBarProps> { private myToolBar = React.createRef<JqxToolBar>(); constructor(props: {}) { super(props); this.state = { 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; } } } } public componentDidMount(): void { this.myToolBar.current!.render(); } public render() { return ( <JqxToolBar ref={this.myToolBar} width={'70%'} height={35} tools={this.state.tools} initTools={this.state.initTools} /> ); } } ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement); |
||
refresh | None | |
Refreshes the widget. /* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import JqxToolBar, { IToolBarProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxtoolbar'; class App extends React.PureComponent<{}, IToolBarProps> { private myToolBar = React.createRef<JqxToolBar>(); constructor(props: {}) { super(props); this.state = { 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; } } } } public componentDidMount(): void { this.myToolBar.current!.refresh(); } public render() { return ( <JqxToolBar ref={this.myToolBar} width={'70%'} height={35} tools={this.state.tools} initTools={this.state.initTools} /> ); } } ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement); |