| Name | Type | Default |
|---|---|---|
| disabled | boolean | false |
|
Enables or disables the jqxButtonGroup. /* tslint:disable */
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import JqxButtonGroup, { IButtonGroupProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxbuttongroup';
class App extends React.PureComponent<{}, IButtonGroupProps> {
private myButtonGroup = React.createRef<JqxButtonGroup>();
public render() {
return (
<JqxButtonGroup ref={this.myButtonGroup}
disabled={true}>
<button style='padding: 4px 16px' id='Left' value='Left'></button>
<button style='padding: 4px 16px' id='Center' value='Center'></button>
<button style='padding: 4px 16px' id='Right' value='Right'></button>
</JqxButtonGroup>
);
}
}
ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement);
|
||
| enableHover | boolean | false |
|
Enables or disabled the highlight state. /* tslint:disable */
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import JqxButtonGroup, { IButtonGroupProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxbuttongroup';
class App extends React.PureComponent<{}, IButtonGroupProps> {
private myButtonGroup = React.createRef<JqxButtonGroup>();
public render() {
return (
<JqxButtonGroup ref={this.myButtonGroup}
enableHover={false}>
<button style='padding: 4px 16px' id='Left' value='Left'></button>
<button style='padding: 4px 16px' id='Center' value='Center'></button>
<button style='padding: 4px 16px' id='Right' value='Right'></button>
</JqxButtonGroup>
);
}
}
ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement);
|
||
| mode | ButtonGroupMode | 'default' |
|
ButtonGroupMode: "checkbox" | "radio" | "default"
Sets or gets the jqxButtonGroup's mode. Possible Values:
/* tslint:disable */
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import JqxButtonGroup, { IButtonGroupProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxbuttongroup';
class App extends React.PureComponent<{}, IButtonGroupProps> {
private myButtonGroup = React.createRef<JqxButtonGroup>();
public render() {
return (
<JqxButtonGroup ref={this.myButtonGroup}
mode={'radio'}>
<button style='padding: 4px 16px' id='Left' value='Left'></button>
<button style='padding: 4px 16px' id='Center' value='Center'></button>
<button style='padding: 4px 16px' id='Right' value='Right'></button>
</JqxButtonGroup>
);
}
}
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 JqxButtonGroup, { IButtonGroupProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxbuttongroup';
class App extends React.PureComponent<{}, IButtonGroupProps> {
private myButtonGroup = React.createRef<JqxButtonGroup>();
public render() {
return (
<JqxButtonGroup ref={this.myButtonGroup}
rtl={true}>
<button style='padding: 4px 16px' id='Left' value='Left'></button>
<button style='padding: 4px 16px' id='Center' value='Center'></button>
<button style='padding: 4px 16px' id='Right' value='Right'></button>
</JqxButtonGroup>
);
}
}
ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement);
|
||
| template | ButtonGroupTemplate | 'default' |
|
ButtonGroupTemplate: "default" | "primary" | "success" | "warning" | "danger" | "info"
Determines the template as an alternative of the default styles. Possible Values:
/* tslint:disable */
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import JqxButtonGroup, { IButtonGroupProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxbuttongroup';
class App extends React.PureComponent<{}, IButtonGroupProps> {
private myButtonGroup = React.createRef<JqxButtonGroup>();
public render() {
return (
<JqxButtonGroup ref={this.myButtonGroup}
template={'success'}>
<button style='padding: 4px 16px' id='Left' value='Left'></button>
<button style='padding: 4px 16px' id='Center' value='Center'></button>
<button style='padding: 4px 16px' id='Right' value='Right'></button>
</JqxButtonGroup>
);
}
}
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 JqxButtonGroup, { IButtonGroupProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxbuttongroup';
class App extends React.PureComponent<{}, IButtonGroupProps> {
private myButtonGroup = React.createRef<JqxButtonGroup>();
public render() {
return (
<JqxButtonGroup ref={this.myButtonGroup}
theme={'material'}>
<button style='padding: 4px 16px' id='Left' value='Left'></button>
<button style='padding: 4px 16px' id='Center' value='Center'></button>
<button style='padding: 4px 16px' id='Right' value='Right'></button>
</JqxButtonGroup>
);
}
}
ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement);
|
||
Events |
||
| buttonclick | Event | |
|
This event is triggered when a button is clicked. 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 JqxButtonGroup, { IButtonGroupProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxbuttongroup';
class App extends React.PureComponent<{}, IButtonGroupProps> {
private myButtonGroup = React.createRef<JqxButtonGroup>();
public render() {
return (
<JqxButtonGroup ref={this.myButtonGroup} onButtonclick={this.onButtonclick}
>
<button style='padding: 4px 16px' id='Left' value='Left'></button>
<button style='padding: 4px 16px' id='Center' value='Center'></button>
<button style='padding: 4px 16px' id='Right' value='Right'></button>
</JqxButtonGroup>
);
}
private onButtonclick(e: Event): void {
alert('do something...');
}
}
ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement);
|
||
| selected | Event | |
|
This event is triggered when a button is selected - in checkboxes or radio buttons mode. 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 JqxButtonGroup, { IButtonGroupProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxbuttongroup';
class App extends React.PureComponent<{}, IButtonGroupProps> {
private myButtonGroup = React.createRef<JqxButtonGroup>();
public render() {
return (
<JqxButtonGroup ref={this.myButtonGroup} onSelected={this.onSelected}
>
<button style='padding: 4px 16px' id='Left' value='Left'></button>
<button style='padding: 4px 16px' id='Center' value='Center'></button>
<button style='padding: 4px 16px' id='Right' value='Right'></button>
</JqxButtonGroup>
);
}
private onSelected(e: Event): void {
alert('do something...');
}
}
ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement);
|
||
| unselected | Event | |
|
This event is triggered when a button is unselected - in checkbox or radio buttons mode. 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 JqxButtonGroup, { IButtonGroupProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxbuttongroup';
class App extends React.PureComponent<{}, IButtonGroupProps> {
private myButtonGroup = React.createRef<JqxButtonGroup>();
public render() {
return (
<JqxButtonGroup ref={this.myButtonGroup} onUnselected={this.onUnselected}
>
<button style='padding: 4px 16px' id='Left' value='Left'></button>
<button style='padding: 4px 16px' id='Center' value='Center'></button>
<button style='padding: 4px 16px' id='Right' value='Right'></button>
</JqxButtonGroup>
);
}
private onUnselected(e: Event): void {
alert('do something...');
}
}
ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement);
|
||
Methods |
||
| Name | Arguments | Return Type |
| disableAt | index | |
|
Disables a button at specific index. /* tslint:disable */
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import JqxButtonGroup, { IButtonGroupProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxbuttongroup';
class App extends React.PureComponent<{}, IButtonGroupProps> {
private myButtonGroup = React.createRef<JqxButtonGroup>();
public componentDidMount(): void {
this.myButtonGroup.current!.disableAt(1);
}
public render() {
return (
<JqxButtonGroup ref={this.myButtonGroup}
>
<button style='padding: 4px 16px' id='Left' value='Left'></button>
<button style='padding: 4px 16px' id='Center' value='Center'></button>
<button style='padding: 4px 16px' id='Right' value='Right'></button>
</JqxButtonGroup>
);
}
}
ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement);
|
||
| disable | None | |
|
Disables jqxButtonGroup. /* tslint:disable */
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import JqxButtonGroup, { IButtonGroupProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxbuttongroup';
class App extends React.PureComponent<{}, IButtonGroupProps> {
private myButtonGroup = React.createRef<JqxButtonGroup>();
public componentDidMount(): void {
this.myButtonGroup.current!.disable();
}
public render() {
return (
<JqxButtonGroup ref={this.myButtonGroup}
>
<button style='padding: 4px 16px' id='Left' value='Left'></button>
<button style='padding: 4px 16px' id='Center' value='Center'></button>
<button style='padding: 4px 16px' id='Right' value='Right'></button>
</JqxButtonGroup>
);
}
}
ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement);
|
||
| destroy | None | |
|
Destroys the widget. /* tslint:disable */
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import JqxButtonGroup, { IButtonGroupProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxbuttongroup';
class App extends React.PureComponent<{}, IButtonGroupProps> {
private myButtonGroup = React.createRef<JqxButtonGroup>();
public componentDidMount(): void {
this.myButtonGroup.current!.destroy();
}
public render() {
return (
<JqxButtonGroup ref={this.myButtonGroup}
>
<button style='padding: 4px 16px' id='Left' value='Left'></button>
<button style='padding: 4px 16px' id='Center' value='Center'></button>
<button style='padding: 4px 16px' id='Right' value='Right'></button>
</JqxButtonGroup>
);
}
}
ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement);
|
||
| enable | None | |
|
Enables the jqxButtonGroup. /* tslint:disable */
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import JqxButtonGroup, { IButtonGroupProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxbuttongroup';
class App extends React.PureComponent<{}, IButtonGroupProps> {
private myButtonGroup = React.createRef<JqxButtonGroup>();
public componentDidMount(): void {
this.myButtonGroup.current!.enable();
}
public render() {
return (
<JqxButtonGroup ref={this.myButtonGroup}
>
<button style='padding: 4px 16px' id='Left' value='Left'></button>
<button style='padding: 4px 16px' id='Center' value='Center'></button>
<button style='padding: 4px 16px' id='Right' value='Right'></button>
</JqxButtonGroup>
);
}
}
ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement);
|
||
| enableAt | index | |
|
Enables a button at specific index. /* tslint:disable */
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import JqxButtonGroup, { IButtonGroupProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxbuttongroup';
class App extends React.PureComponent<{}, IButtonGroupProps> {
private myButtonGroup = React.createRef<JqxButtonGroup>();
public componentDidMount(): void {
this.myButtonGroup.current!.enableAt(1);
}
public render() {
return (
<JqxButtonGroup ref={this.myButtonGroup}
>
<button style='padding: 4px 16px' id='Left' value='Left'></button>
<button style='padding: 4px 16px' id='Center' value='Center'></button>
<button style='padding: 4px 16px' id='Right' value='Right'></button>
</JqxButtonGroup>
);
}
}
ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement);
|
||
| getSelection | None | |
|
Gets the index or indexes of the selected button(s).
/* tslint:disable */
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import JqxButtonGroup, { IButtonGroupProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxbuttongroup';
class App extends React.PureComponent<{}, IButtonGroupProps> {
private myButtonGroup = React.createRef<JqxButtonGroup>();
public componentDidMount(): void {
this.myButtonGroup.current!.getSelection();
}
public render() {
return (
<JqxButtonGroup ref={this.myButtonGroup}
>
<button style='padding: 4px 16px' id='Left' value='Left'></button>
<button style='padding: 4px 16px' id='Center' value='Center'></button>
<button style='padding: 4px 16px' id='Right' value='Right'></button>
</JqxButtonGroup>
);
}
}
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 JqxButtonGroup, { IButtonGroupProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxbuttongroup';
class App extends React.PureComponent<{}, IButtonGroupProps> {
private myButtonGroup = React.createRef<JqxButtonGroup>();
public componentDidMount(): void {
this.myButtonGroup.current!.render();
}
public render() {
return (
<JqxButtonGroup ref={this.myButtonGroup}
>
<button style='padding: 4px 16px' id='Left' value='Left'></button>
<button style='padding: 4px 16px' id='Center' value='Center'></button>
<button style='padding: 4px 16px' id='Right' value='Right'></button>
</JqxButtonGroup>
);
}
}
ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement);
|
||
| setSelection | index | |
|
Selects a button in checkbox or radio buttons mode /* tslint:disable */
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css';
import JqxButtonGroup, { IButtonGroupProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxbuttongroup';
class App extends React.PureComponent<{}, IButtonGroupProps> {
private myButtonGroup = React.createRef<JqxButtonGroup>();
public componentDidMount(): void {
this.myButtonGroup.current!.setSelection(1);
}
public render() {
return (
<JqxButtonGroup ref={this.myButtonGroup}
>
<button style='padding: 4px 16px' id='Left' value='Left'></button>
<button style='padding: 4px 16px' id='Center' value='Center'></button>
<button style='padding: 4px 16px' id='Right' value='Right'></button>
</JqxButtonGroup>
);
}
}
ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement);
|
||