Name | Type | Default |
---|---|---|
contextMenu | boolean | false |
Sets or gets wheter a custom context menu will appear when certain elements of the widget are right-clicked. /* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import JqxLayout, { ILayoutProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxlayout'; class App extends React.PureComponent<{}, ILayoutProps> { private myLayout = React.createRef<JqxLayout>(); constructor(props: {}) { super(props); this.state = { layout: [{ type: 'layoutGroup', orientation: 'horizontal', items: [{ type: 'autoHideGroup', alignment: 'left', width: 80, unpinnedWidth: 200, items: [{ type: 'layoutPanel', title: 'Toolbox', contentContainer: 'ToolboxPanel' }, { type: 'layoutPanel', title: 'Help', contentContainer: 'HelpPanel' }] }, { type: 'layoutGroup', orientation: 'vertical', width: 500, items: [{ type: 'documentGroup', height: 400, minHeight: 200, items: [{ type: 'documentPanel', title: 'Document 1', contentContainer: 'Document1Panel' }, { type: 'documentPanel', title: 'Document 2', contentContainer: 'Document2Panel' }] }, { type: 'tabbedGroup', height: 200, pinnedHeight: 30, items: [{ type: 'layoutPanel', title: 'Error List', contentContainer: 'ErrorListPanel' }, { type: 'layoutPanel', title: 'Output', contentContainer: 'OutputPanel', selected: true }] }] }, { type: 'tabbedGroup', width: 220, minWidth: 200, items: [{ type: 'layoutPanel', title: 'Solution Explorer', contentContainer: 'SolutionExplorerPanel' }, { type: 'layoutPanel', title: 'Properties', contentContainer: 'PropertiesPanel' }] }] }] } } public render() { return ( <JqxLayout ref={this.myLayout} width={800} height={600} layout={this.state.layout} contextMenu={true}> <div data-container="ToolboxPanel">List of tools</div> <div data-container="HelpPanel"> Help topics </div> <!--documentGroup--> <div data-container="Document1Panel"> Document 1 content </div> <div data-container="Document2Panel"> Document 2 content </div> <!--bottom tabbedGroup--> <div data-container="ErrorListPanel"> List of errors </div> <div data-container="OutputPanel"> Output </div> <!--right tabbedGroup--> <div data-container="SolutionExplorerPanel"> Solution structure </div> <div data-container="PropertiesPanel"> List of properties </div> </JqxLayout> ); } } ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement); |
||
height | string | number | null |
Sets or gets the layout's height. /* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import JqxLayout, { ILayoutProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxlayout'; class App extends React.PureComponent<{}, ILayoutProps> { private myLayout = React.createRef<JqxLayout>(); constructor(props: {}) { super(props); this.state = { layout: [{ type: 'layoutGroup', orientation: 'horizontal', items: [{ type: 'autoHideGroup', alignment: 'left', width: 80, unpinnedWidth: 200, items: [{ type: 'layoutPanel', title: 'Toolbox', contentContainer: 'ToolboxPanel' }, { type: 'layoutPanel', title: 'Help', contentContainer: 'HelpPanel' }] }, { type: 'layoutGroup', orientation: 'vertical', width: 500, items: [{ type: 'documentGroup', height: 400, minHeight: 200, items: [{ type: 'documentPanel', title: 'Document 1', contentContainer: 'Document1Panel' }, { type: 'documentPanel', title: 'Document 2', contentContainer: 'Document2Panel' }] }, { type: 'tabbedGroup', height: 200, pinnedHeight: 30, items: [{ type: 'layoutPanel', title: 'Error List', contentContainer: 'ErrorListPanel' }, { type: 'layoutPanel', title: 'Output', contentContainer: 'OutputPanel', selected: true }] }] }, { type: 'tabbedGroup', width: 220, minWidth: 200, items: [{ type: 'layoutPanel', title: 'Solution Explorer', contentContainer: 'SolutionExplorerPanel' }, { type: 'layoutPanel', title: 'Properties', contentContainer: 'PropertiesPanel' }] }] }] } } public render() { return ( <JqxLayout ref={this.myLayout} width={800} height={600} layout={this.state.layout}> <div data-container="ToolboxPanel">List of tools</div> <div data-container="HelpPanel"> Help topics </div> <!--documentGroup--> <div data-container="Document1Panel"> Document 1 content </div> <div data-container="Document2Panel"> Document 2 content </div> <!--bottom tabbedGroup--> <div data-container="ErrorListPanel"> List of errors </div> <div data-container="OutputPanel"> Output </div> <!--right tabbedGroup--> <div data-container="SolutionExplorerPanel"> Solution structure </div> <div data-container="PropertiesPanel"> List of properties </div> </JqxLayout> ); } } ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement); |
||
layout | Array<Layout> | [] |
LayoutType: "layoutGroup" | "tabbedGroup" | "documentGroup" | "autoHideGroup" | "layoutPanel" | "documentPanel"
LayoutAlignment: "left" | "right" | "top" | "bottom" LayoutOrientation: "horizontal" | "vertical" Interface Layout { type?: LayoutType; alignment?: LayoutAlignment; allowClose?: boolean; allowPin?: boolean; allowUnpin?: boolean; contentContainer?: string; height?: number | string; initContent?: () => void; minHeight?: number | string; minWidth?: number | string; orientation?: LayoutOrientation; pinnedHeight?: number | string; pinnedWidth?: number | string; selected?: boolean; title?: number | string; unpinnedHeight?: number | string; unpinnedWidth?: number | string; width?: number | string; items?: Array<Layout>; } Sets or gets the layout. This property determines the position of the layout elements and their characteristics. The layout array always contains one root item of type 'layoutGroup'. Each object in the layout array can have the following properties, with some restrictions based on the type :
/* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import JqxLayout, { ILayoutProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxlayout'; class App extends React.PureComponent<{}, ILayoutProps> { private myLayout = React.createRef<JqxLayout>(); constructor(props: {}) { super(props); this.state = { layout: [{ type: 'layoutGroup', orientation: 'horizontal', items: [{ type: 'autoHideGroup', alignment: 'left', width: 80, unpinnedWidth: 200, items: [{ type: 'layoutPanel', title: 'Toolbox', contentContainer: 'ToolboxPanel' }, { type: 'layoutPanel', title: 'Help', contentContainer: 'HelpPanel' }] }, { type: 'layoutGroup', orientation: 'vertical', width: 500, items: [{ type: 'documentGroup', height: 400, minHeight: 200, items: [{ type: 'documentPanel', title: 'Document 1', contentContainer: 'Document1Panel' }, { type: 'documentPanel', title: 'Document 2', contentContainer: 'Document2Panel' }] }, { type: 'tabbedGroup', height: 200, pinnedHeight: 30, items: [{ type: 'layoutPanel', title: 'Error List', contentContainer: 'ErrorListPanel' }, { type: 'layoutPanel', title: 'Output', contentContainer: 'OutputPanel', selected: true }] }] }, { type: 'tabbedGroup', width: 220, minWidth: 200, items: [{ type: 'layoutPanel', title: 'Solution Explorer', contentContainer: 'SolutionExplorerPanel' }, { type: 'layoutPanel', title: 'Properties', contentContainer: 'PropertiesPanel' }] }] }] } } public render() { return ( <JqxLayout ref={this.myLayout} width={800} height={600} layout={this.state.layout}> <div data-container="ToolboxPanel">List of tools</div> <div data-container="HelpPanel"> Help topics </div> <!--documentGroup--> <div data-container="Document1Panel"> Document 1 content </div> <div data-container="Document2Panel"> Document 2 content </div> <!--bottom tabbedGroup--> <div data-container="ErrorListPanel"> List of errors </div> <div data-container="OutputPanel"> Output </div> <!--right tabbedGroup--> <div data-container="SolutionExplorerPanel"> Solution structure </div> <div data-container="PropertiesPanel"> List of properties </div> </JqxLayout> ); } } ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement); |
||
minGroupHeight | number | string | 100 |
Sets the default minimumn height for groups which are vertically aligned within their parent group. /* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import JqxLayout, { ILayoutProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxlayout'; class App extends React.PureComponent<{}, ILayoutProps> { private myLayout = React.createRef<JqxLayout>(); constructor(props: {}) { super(props); this.state = { layout: [{ type: 'layoutGroup', orientation: 'horizontal', items: [{ type: 'autoHideGroup', alignment: 'left', width: 80, unpinnedWidth: 200, items: [{ type: 'layoutPanel', title: 'Toolbox', contentContainer: 'ToolboxPanel' }, { type: 'layoutPanel', title: 'Help', contentContainer: 'HelpPanel' }] }, { type: 'layoutGroup', orientation: 'vertical', width: 500, items: [{ type: 'documentGroup', height: 400, minHeight: 200, items: [{ type: 'documentPanel', title: 'Document 1', contentContainer: 'Document1Panel' }, { type: 'documentPanel', title: 'Document 2', contentContainer: 'Document2Panel' }] }, { type: 'tabbedGroup', height: 200, pinnedHeight: 30, items: [{ type: 'layoutPanel', title: 'Error List', contentContainer: 'ErrorListPanel' }, { type: 'layoutPanel', title: 'Output', contentContainer: 'OutputPanel', selected: true }] }] }, { type: 'tabbedGroup', width: 220, minWidth: 200, items: [{ type: 'layoutPanel', title: 'Solution Explorer', contentContainer: 'SolutionExplorerPanel' }, { type: 'layoutPanel', title: 'Properties', contentContainer: 'PropertiesPanel' }] }] }] } } public render() { return ( <JqxLayout ref={this.myLayout} width={800} height={600} layout={this.state.layout} minGroupHeight={200}> <div data-container="ToolboxPanel">List of tools</div> <div data-container="HelpPanel"> Help topics </div> <!--documentGroup--> <div data-container="Document1Panel"> Document 1 content </div> <div data-container="Document2Panel"> Document 2 content </div> <!--bottom tabbedGroup--> <div data-container="ErrorListPanel"> List of errors </div> <div data-container="OutputPanel"> Output </div> <!--right tabbedGroup--> <div data-container="SolutionExplorerPanel"> Solution structure </div> <div data-container="PropertiesPanel"> List of properties </div> </JqxLayout> ); } } ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement); |
||
minGroupWidth | number | string | 100 |
Sets the default minimumn width for groups which are horizontally aligned within their parent group. /* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import JqxLayout, { ILayoutProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxlayout'; class App extends React.PureComponent<{}, ILayoutProps> { private myLayout = React.createRef<JqxLayout>(); constructor(props: {}) { super(props); this.state = { layout: [{ type: 'layoutGroup', orientation: 'horizontal', items: [{ type: 'autoHideGroup', alignment: 'left', width: 80, unpinnedWidth: 200, items: [{ type: 'layoutPanel', title: 'Toolbox', contentContainer: 'ToolboxPanel' }, { type: 'layoutPanel', title: 'Help', contentContainer: 'HelpPanel' }] }, { type: 'layoutGroup', orientation: 'vertical', width: 500, items: [{ type: 'documentGroup', height: 400, minHeight: 200, items: [{ type: 'documentPanel', title: 'Document 1', contentContainer: 'Document1Panel' }, { type: 'documentPanel', title: 'Document 2', contentContainer: 'Document2Panel' }] }, { type: 'tabbedGroup', height: 200, pinnedHeight: 30, items: [{ type: 'layoutPanel', title: 'Error List', contentContainer: 'ErrorListPanel' }, { type: 'layoutPanel', title: 'Output', contentContainer: 'OutputPanel', selected: true }] }] }, { type: 'tabbedGroup', width: 220, minWidth: 200, items: [{ type: 'layoutPanel', title: 'Solution Explorer', contentContainer: 'SolutionExplorerPanel' }, { type: 'layoutPanel', title: 'Properties', contentContainer: 'PropertiesPanel' }] }] }] } } public render() { return ( <JqxLayout ref={this.myLayout} width={800} height={600} layout={this.state.layout} minGroupWidth={150}> <div data-container="ToolboxPanel">List of tools</div> <div data-container="HelpPanel"> Help topics </div> <!--documentGroup--> <div data-container="Document1Panel"> Document 1 content </div> <div data-container="Document2Panel"> Document 2 content </div> <!--bottom tabbedGroup--> <div data-container="ErrorListPanel"> List of errors </div> <div data-container="OutputPanel"> Output </div> <!--right tabbedGroup--> <div data-container="SolutionExplorerPanel"> Solution structure </div> <div data-container="PropertiesPanel"> List of properties </div> </JqxLayout> ); } } ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement); |
||
resizable | boolean | true |
Sets or gets wheter panels can be dynamically resized. /* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import JqxLayout, { ILayoutProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxlayout'; class App extends React.PureComponent<{}, ILayoutProps> { private myLayout = React.createRef<JqxLayout>(); constructor(props: {}) { super(props); this.state = { layout: [{ type: 'layoutGroup', orientation: 'horizontal', items: [{ type: 'autoHideGroup', alignment: 'left', width: 80, unpinnedWidth: 200, items: [{ type: 'layoutPanel', title: 'Toolbox', contentContainer: 'ToolboxPanel' }, { type: 'layoutPanel', title: 'Help', contentContainer: 'HelpPanel' }] }, { type: 'layoutGroup', orientation: 'vertical', width: 500, items: [{ type: 'documentGroup', height: 400, minHeight: 200, items: [{ type: 'documentPanel', title: 'Document 1', contentContainer: 'Document1Panel' }, { type: 'documentPanel', title: 'Document 2', contentContainer: 'Document2Panel' }] }, { type: 'tabbedGroup', height: 200, pinnedHeight: 30, items: [{ type: 'layoutPanel', title: 'Error List', contentContainer: 'ErrorListPanel' }, { type: 'layoutPanel', title: 'Output', contentContainer: 'OutputPanel', selected: true }] }] }, { type: 'tabbedGroup', width: 220, minWidth: 200, items: [{ type: 'layoutPanel', title: 'Solution Explorer', contentContainer: 'SolutionExplorerPanel' }, { type: 'layoutPanel', title: 'Properties', contentContainer: 'PropertiesPanel' }] }] }] } } public render() { return ( <JqxLayout ref={this.myLayout} width={800} height={600} layout={this.state.layout} resizable={false}> <div data-container="ToolboxPanel">List of tools</div> <div data-container="HelpPanel"> Help topics </div> <!--documentGroup--> <div data-container="Document1Panel"> Document 1 content </div> <div data-container="Document2Panel"> Document 2 content </div> <!--bottom tabbedGroup--> <div data-container="ErrorListPanel"> List of errors </div> <div data-container="OutputPanel"> Output </div> <!--right tabbedGroup--> <div data-container="SolutionExplorerPanel"> Solution structure </div> <div data-container="PropertiesPanel"> List of properties </div> </JqxLayout> ); } } 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 JqxLayout, { ILayoutProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxlayout'; class App extends React.PureComponent<{}, ILayoutProps> { private myLayout = React.createRef<JqxLayout>(); constructor(props: {}) { super(props); this.state = { layout: [{ type: 'layoutGroup', orientation: 'horizontal', items: [{ type: 'autoHideGroup', alignment: 'left', width: 80, unpinnedWidth: 200, items: [{ type: 'layoutPanel', title: 'Toolbox', contentContainer: 'ToolboxPanel' }, { type: 'layoutPanel', title: 'Help', contentContainer: 'HelpPanel' }] }, { type: 'layoutGroup', orientation: 'vertical', width: 500, items: [{ type: 'documentGroup', height: 400, minHeight: 200, items: [{ type: 'documentPanel', title: 'Document 1', contentContainer: 'Document1Panel' }, { type: 'documentPanel', title: 'Document 2', contentContainer: 'Document2Panel' }] }, { type: 'tabbedGroup', height: 200, pinnedHeight: 30, items: [{ type: 'layoutPanel', title: 'Error List', contentContainer: 'ErrorListPanel' }, { type: 'layoutPanel', title: 'Output', contentContainer: 'OutputPanel', selected: true }] }] }, { type: 'tabbedGroup', width: 220, minWidth: 200, items: [{ type: 'layoutPanel', title: 'Solution Explorer', contentContainer: 'SolutionExplorerPanel' }, { type: 'layoutPanel', title: 'Properties', contentContainer: 'PropertiesPanel' }] }] }] } } public render() { return ( <JqxLayout ref={this.myLayout} width={800} height={600} layout={this.state.layout} rtl={true}> <div data-container="ToolboxPanel">List of tools</div> <div data-container="HelpPanel"> Help topics </div> <!--documentGroup--> <div data-container="Document1Panel"> Document 1 content </div> <div data-container="Document2Panel"> Document 2 content </div> <!--bottom tabbedGroup--> <div data-container="ErrorListPanel"> List of errors </div> <div data-container="OutputPanel"> Output </div> <!--right tabbedGroup--> <div data-container="SolutionExplorerPanel"> Solution structure </div> <div data-container="PropertiesPanel"> List of properties </div> </JqxLayout> ); } } 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 JqxLayout, { ILayoutProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxlayout'; class App extends React.PureComponent<{}, ILayoutProps> { private myLayout = React.createRef<JqxLayout>(); constructor(props: {}) { super(props); this.state = { layout: [{ type: 'layoutGroup', orientation: 'horizontal', items: [{ type: 'autoHideGroup', alignment: 'left', width: 80, unpinnedWidth: 200, items: [{ type: 'layoutPanel', title: 'Toolbox', contentContainer: 'ToolboxPanel' }, { type: 'layoutPanel', title: 'Help', contentContainer: 'HelpPanel' }] }, { type: 'layoutGroup', orientation: 'vertical', width: 500, items: [{ type: 'documentGroup', height: 400, minHeight: 200, items: [{ type: 'documentPanel', title: 'Document 1', contentContainer: 'Document1Panel' }, { type: 'documentPanel', title: 'Document 2', contentContainer: 'Document2Panel' }] }, { type: 'tabbedGroup', height: 200, pinnedHeight: 30, items: [{ type: 'layoutPanel', title: 'Error List', contentContainer: 'ErrorListPanel' }, { type: 'layoutPanel', title: 'Output', contentContainer: 'OutputPanel', selected: true }] }] }, { type: 'tabbedGroup', width: 220, minWidth: 200, items: [{ type: 'layoutPanel', title: 'Solution Explorer', contentContainer: 'SolutionExplorerPanel' }, { type: 'layoutPanel', title: 'Properties', contentContainer: 'PropertiesPanel' }] }] }] } } public render() { return ( <JqxLayout ref={this.myLayout} width={800} height={600} layout={this.state.layout} theme={'material'}> <div data-container="ToolboxPanel">List of tools</div> <div data-container="HelpPanel"> Help topics </div> <!--documentGroup--> <div data-container="Document1Panel"> Document 1 content </div> <div data-container="Document2Panel"> Document 2 content </div> <!--bottom tabbedGroup--> <div data-container="ErrorListPanel"> List of errors </div> <div data-container="OutputPanel"> Output </div> <!--right tabbedGroup--> <div data-container="SolutionExplorerPanel"> Solution structure </div> <div data-container="PropertiesPanel"> List of properties </div> </JqxLayout> ); } } ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement); |
||
width | string | number | null |
Sets or gets the layout's width. /* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import JqxLayout, { ILayoutProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxlayout'; class App extends React.PureComponent<{}, ILayoutProps> { private myLayout = React.createRef<JqxLayout>(); constructor(props: {}) { super(props); this.state = { layout: [{ type: 'layoutGroup', orientation: 'horizontal', items: [{ type: 'autoHideGroup', alignment: 'left', width: 80, unpinnedWidth: 200, items: [{ type: 'layoutPanel', title: 'Toolbox', contentContainer: 'ToolboxPanel' }, { type: 'layoutPanel', title: 'Help', contentContainer: 'HelpPanel' }] }, { type: 'layoutGroup', orientation: 'vertical', width: 500, items: [{ type: 'documentGroup', height: 400, minHeight: 200, items: [{ type: 'documentPanel', title: 'Document 1', contentContainer: 'Document1Panel' }, { type: 'documentPanel', title: 'Document 2', contentContainer: 'Document2Panel' }] }, { type: 'tabbedGroup', height: 200, pinnedHeight: 30, items: [{ type: 'layoutPanel', title: 'Error List', contentContainer: 'ErrorListPanel' }, { type: 'layoutPanel', title: 'Output', contentContainer: 'OutputPanel', selected: true }] }] }, { type: 'tabbedGroup', width: 220, minWidth: 200, items: [{ type: 'layoutPanel', title: 'Solution Explorer', contentContainer: 'SolutionExplorerPanel' }, { type: 'layoutPanel', title: 'Properties', contentContainer: 'PropertiesPanel' }] }] }] } } public render() { return ( <JqxLayout ref={this.myLayout} width={800} height={600} layout={this.state.layout}> <div data-container="ToolboxPanel">List of tools</div> <div data-container="HelpPanel"> Help topics </div> <!--documentGroup--> <div data-container="Document1Panel"> Document 1 content </div> <div data-container="Document2Panel"> Document 2 content </div> <!--bottom tabbedGroup--> <div data-container="ErrorListPanel"> List of errors </div> <div data-container="OutputPanel"> Output </div> <!--right tabbedGroup--> <div data-container="SolutionExplorerPanel"> Solution structure </div> <div data-container="PropertiesPanel"> List of properties </div> </JqxLayout> ); } } ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement); |
||
Events |
||
pin | Event | |
This event is triggered when a group has been pinned. 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 JqxLayout, { ILayoutProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxlayout'; class App extends React.PureComponent<{}, ILayoutProps> { private myLayout = React.createRef<JqxLayout>(); constructor(props: {}) { super(props); this.state = { layout: [{ type: 'layoutGroup', orientation: 'horizontal', items: [{ type: 'autoHideGroup', alignment: 'left', width: 80, unpinnedWidth: 200, items: [{ type: 'layoutPanel', title: 'Toolbox', contentContainer: 'ToolboxPanel' }, { type: 'layoutPanel', title: 'Help', contentContainer: 'HelpPanel' }] }, { type: 'layoutGroup', orientation: 'vertical', width: 500, items: [{ type: 'documentGroup', height: 400, minHeight: 200, items: [{ type: 'documentPanel', title: 'Document 1', contentContainer: 'Document1Panel' }, { type: 'documentPanel', title: 'Document 2', contentContainer: 'Document2Panel' }] }, { type: 'tabbedGroup', height: 200, pinnedHeight: 30, items: [{ type: 'layoutPanel', title: 'Error List', contentContainer: 'ErrorListPanel' }, { type: 'layoutPanel', title: 'Output', contentContainer: 'OutputPanel', selected: true }] }] }, { type: 'tabbedGroup', width: 220, minWidth: 200, items: [{ type: 'layoutPanel', title: 'Solution Explorer', contentContainer: 'SolutionExplorerPanel' }, { type: 'layoutPanel', title: 'Properties', contentContainer: 'PropertiesPanel' }] }] }] } } public render() { return ( <JqxLayout ref={this.myLayout} onPin={this.onPin} width={800} height={600} layout={this.state.layout}> <div data-container="ToolboxPanel">List of tools</div> <div data-container="HelpPanel"> Help topics </div> <!--documentGroup--> <div data-container="Document1Panel"> Document 1 content </div> <div data-container="Document2Panel"> Document 2 content </div> <!--bottom tabbedGroup--> <div data-container="ErrorListPanel"> List of errors </div> <div data-container="OutputPanel"> Output </div> <!--right tabbedGroup--> <div data-container="SolutionExplorerPanel"> Solution structure </div> <div data-container="PropertiesPanel"> List of properties </div> </JqxLayout> ); } private onPin(e: Event): void { alert('do something...'); } } ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement); |
||
resize | Event | |
This event is triggered when a group has been resized (when the group has been resized with the mouse or when an adjacent group has been pinned, unpinned or 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 JqxLayout, { ILayoutProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxlayout'; class App extends React.PureComponent<{}, ILayoutProps> { private myLayout = React.createRef<JqxLayout>(); constructor(props: {}) { super(props); this.state = { layout: [{ type: 'layoutGroup', orientation: 'horizontal', items: [{ type: 'autoHideGroup', alignment: 'left', width: 80, unpinnedWidth: 200, items: [{ type: 'layoutPanel', title: 'Toolbox', contentContainer: 'ToolboxPanel' }, { type: 'layoutPanel', title: 'Help', contentContainer: 'HelpPanel' }] }, { type: 'layoutGroup', orientation: 'vertical', width: 500, items: [{ type: 'documentGroup', height: 400, minHeight: 200, items: [{ type: 'documentPanel', title: 'Document 1', contentContainer: 'Document1Panel' }, { type: 'documentPanel', title: 'Document 2', contentContainer: 'Document2Panel' }] }, { type: 'tabbedGroup', height: 200, pinnedHeight: 30, items: [{ type: 'layoutPanel', title: 'Error List', contentContainer: 'ErrorListPanel' }, { type: 'layoutPanel', title: 'Output', contentContainer: 'OutputPanel', selected: true }] }] }, { type: 'tabbedGroup', width: 220, minWidth: 200, items: [{ type: 'layoutPanel', title: 'Solution Explorer', contentContainer: 'SolutionExplorerPanel' }, { type: 'layoutPanel', title: 'Properties', contentContainer: 'PropertiesPanel' }] }] }] } } public render() { return ( <JqxLayout ref={this.myLayout} onResize={this.onResize} width={800} height={600} layout={this.state.layout}> <div data-container="ToolboxPanel">List of tools</div> <div data-container="HelpPanel"> Help topics </div> <!--documentGroup--> <div data-container="Document1Panel"> Document 1 content </div> <div data-container="Document2Panel"> Document 2 content </div> <!--bottom tabbedGroup--> <div data-container="ErrorListPanel"> List of errors </div> <div data-container="OutputPanel"> Output </div> <!--right tabbedGroup--> <div data-container="SolutionExplorerPanel"> Solution structure </div> <div data-container="PropertiesPanel"> List of properties </div> </JqxLayout> ); } private onResize(e: Event): void { alert('do something...'); } } ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement); |
||
unpin | Event | |
This event is triggered when a group has been unpinned. 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 JqxLayout, { ILayoutProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxlayout'; class App extends React.PureComponent<{}, ILayoutProps> { private myLayout = React.createRef<JqxLayout>(); constructor(props: {}) { super(props); this.state = { layout: [{ type: 'layoutGroup', orientation: 'horizontal', items: [{ type: 'autoHideGroup', alignment: 'left', width: 80, unpinnedWidth: 200, items: [{ type: 'layoutPanel', title: 'Toolbox', contentContainer: 'ToolboxPanel' }, { type: 'layoutPanel', title: 'Help', contentContainer: 'HelpPanel' }] }, { type: 'layoutGroup', orientation: 'vertical', width: 500, items: [{ type: 'documentGroup', height: 400, minHeight: 200, items: [{ type: 'documentPanel', title: 'Document 1', contentContainer: 'Document1Panel' }, { type: 'documentPanel', title: 'Document 2', contentContainer: 'Document2Panel' }] }, { type: 'tabbedGroup', height: 200, pinnedHeight: 30, items: [{ type: 'layoutPanel', title: 'Error List', contentContainer: 'ErrorListPanel' }, { type: 'layoutPanel', title: 'Output', contentContainer: 'OutputPanel', selected: true }] }] }, { type: 'tabbedGroup', width: 220, minWidth: 200, items: [{ type: 'layoutPanel', title: 'Solution Explorer', contentContainer: 'SolutionExplorerPanel' }, { type: 'layoutPanel', title: 'Properties', contentContainer: 'PropertiesPanel' }] }] }] } } public render() { return ( <JqxLayout ref={this.myLayout} onUnpin={this.onUnpin} width={800} height={600} layout={this.state.layout}> <div data-container="ToolboxPanel">List of tools</div> <div data-container="HelpPanel"> Help topics </div> <!--documentGroup--> <div data-container="Document1Panel"> Document 1 content </div> <div data-container="Document2Panel"> Document 2 content </div> <!--bottom tabbedGroup--> <div data-container="ErrorListPanel"> List of errors </div> <div data-container="OutputPanel"> Output </div> <!--right tabbedGroup--> <div data-container="SolutionExplorerPanel"> Solution structure </div> <div data-container="PropertiesPanel"> List of properties </div> </JqxLayout> ); } private onUnpin(e: Event): void { alert('do something...'); } } ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement); |
||
Methods |
||
Name | Arguments | Return Type |
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 JqxLayout, { ILayoutProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxlayout'; class App extends React.PureComponent<{}, ILayoutProps> { private myLayout = React.createRef<JqxLayout>(); constructor(props: {}) { super(props); this.state = { layout: [{ type: 'layoutGroup', orientation: 'horizontal', items: [{ type: 'autoHideGroup', alignment: 'left', width: 80, unpinnedWidth: 200, items: [{ type: 'layoutPanel', title: 'Toolbox', contentContainer: 'ToolboxPanel' }, { type: 'layoutPanel', title: 'Help', contentContainer: 'HelpPanel' }] }, { type: 'layoutGroup', orientation: 'vertical', width: 500, items: [{ type: 'documentGroup', height: 400, minHeight: 200, items: [{ type: 'documentPanel', title: 'Document 1', contentContainer: 'Document1Panel' }, { type: 'documentPanel', title: 'Document 2', contentContainer: 'Document2Panel' }] }, { type: 'tabbedGroup', height: 200, pinnedHeight: 30, items: [{ type: 'layoutPanel', title: 'Error List', contentContainer: 'ErrorListPanel' }, { type: 'layoutPanel', title: 'Output', contentContainer: 'OutputPanel', selected: true }] }] }, { type: 'tabbedGroup', width: 220, minWidth: 200, items: [{ type: 'layoutPanel', title: 'Solution Explorer', contentContainer: 'SolutionExplorerPanel' }, { type: 'layoutPanel', title: 'Properties', contentContainer: 'PropertiesPanel' }] }] }] } } public componentDidMount(): void { this.myLayout.current!.destroy(); } public render() { return ( <JqxLayout ref={this.myLayout} width={800} height={600} layout={this.state.layout}> <div data-container="ToolboxPanel">List of tools</div> <div data-container="HelpPanel"> Help topics </div> <!--documentGroup--> <div data-container="Document1Panel"> Document 1 content </div> <div data-container="Document2Panel"> Document 2 content </div> <!--bottom tabbedGroup--> <div data-container="ErrorListPanel"> List of errors </div> <div data-container="OutputPanel"> Output </div> <!--right tabbedGroup--> <div data-container="SolutionExplorerPanel"> Solution structure </div> <div data-container="PropertiesPanel"> List of properties </div> </JqxLayout> ); } } ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement); |
||
loadLayout | Layout | |
Loads a previously saved layout. |
||
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 JqxLayout, { ILayoutProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxlayout'; class App extends React.PureComponent<{}, ILayoutProps> { private myLayout = React.createRef<JqxLayout>(); constructor(props: {}) { super(props); this.state = { layout: [{ type: 'layoutGroup', orientation: 'horizontal', items: [{ type: 'autoHideGroup', alignment: 'left', width: 80, unpinnedWidth: 200, items: [{ type: 'layoutPanel', title: 'Toolbox', contentContainer: 'ToolboxPanel' }, { type: 'layoutPanel', title: 'Help', contentContainer: 'HelpPanel' }] }, { type: 'layoutGroup', orientation: 'vertical', width: 500, items: [{ type: 'documentGroup', height: 400, minHeight: 200, items: [{ type: 'documentPanel', title: 'Document 1', contentContainer: 'Document1Panel' }, { type: 'documentPanel', title: 'Document 2', contentContainer: 'Document2Panel' }] }, { type: 'tabbedGroup', height: 200, pinnedHeight: 30, items: [{ type: 'layoutPanel', title: 'Error List', contentContainer: 'ErrorListPanel' }, { type: 'layoutPanel', title: 'Output', contentContainer: 'OutputPanel', selected: true }] }] }, { type: 'tabbedGroup', width: 220, minWidth: 200, items: [{ type: 'layoutPanel', title: 'Solution Explorer', contentContainer: 'SolutionExplorerPanel' }, { type: 'layoutPanel', title: 'Properties', contentContainer: 'PropertiesPanel' }] }] }] } } public componentDidMount(): void { this.myLayout.current!.refresh(); } public render() { return ( <JqxLayout ref={this.myLayout} width={800} height={600} layout={this.state.layout}> <div data-container="ToolboxPanel">List of tools</div> <div data-container="HelpPanel"> Help topics </div> <!--documentGroup--> <div data-container="Document1Panel"> Document 1 content </div> <div data-container="Document2Panel"> Document 2 content </div> <!--bottom tabbedGroup--> <div data-container="ErrorListPanel"> List of errors </div> <div data-container="OutputPanel"> Output </div> <!--right tabbedGroup--> <div data-container="SolutionExplorerPanel"> Solution structure </div> <div data-container="PropertiesPanel"> List of properties </div> </JqxLayout> ); } } 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 JqxLayout, { ILayoutProps } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxlayout'; class App extends React.PureComponent<{}, ILayoutProps> { private myLayout = React.createRef<JqxLayout>(); constructor(props: {}) { super(props); this.state = { layout: [{ type: 'layoutGroup', orientation: 'horizontal', items: [{ type: 'autoHideGroup', alignment: 'left', width: 80, unpinnedWidth: 200, items: [{ type: 'layoutPanel', title: 'Toolbox', contentContainer: 'ToolboxPanel' }, { type: 'layoutPanel', title: 'Help', contentContainer: 'HelpPanel' }] }, { type: 'layoutGroup', orientation: 'vertical', width: 500, items: [{ type: 'documentGroup', height: 400, minHeight: 200, items: [{ type: 'documentPanel', title: 'Document 1', contentContainer: 'Document1Panel' }, { type: 'documentPanel', title: 'Document 2', contentContainer: 'Document2Panel' }] }, { type: 'tabbedGroup', height: 200, pinnedHeight: 30, items: [{ type: 'layoutPanel', title: 'Error List', contentContainer: 'ErrorListPanel' }, { type: 'layoutPanel', title: 'Output', contentContainer: 'OutputPanel', selected: true }] }] }, { type: 'tabbedGroup', width: 220, minWidth: 200, items: [{ type: 'layoutPanel', title: 'Solution Explorer', contentContainer: 'SolutionExplorerPanel' }, { type: 'layoutPanel', title: 'Properties', contentContainer: 'PropertiesPanel' }] }] }] } } public componentDidMount(): void { this.myLayout.current!.render(); } public render() { return ( <JqxLayout ref={this.myLayout} width={800} height={600} layout={this.state.layout}> <div data-container="ToolboxPanel">List of tools</div> <div data-container="HelpPanel"> Help topics </div> <!--documentGroup--> <div data-container="Document1Panel"> Document 1 content </div> <div data-container="Document2Panel"> Document 2 content </div> <!--bottom tabbedGroup--> <div data-container="ErrorListPanel"> List of errors </div> <div data-container="OutputPanel"> Output </div> <!--right tabbedGroup--> <div data-container="SolutionExplorerPanel"> Solution structure </div> <div data-container="PropertiesPanel"> List of properties </div> </JqxLayout> ); } } ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement); |
||
saveLayout | None | |
Saves the current layout of the widget. The object returned by this method can be passed to the method loadLayout. |