Note: When the following toolbar interfaces are used in general reports, only one toolbar is required in the report, that is, there is only one toolbar at the top or one at the bottom.
getWidgetByName
Method | getWidgetByName(name) | Get the button in the report toolbar, which can be used in combination with the button method |
---|---|---|
Parameter | name: string | Button name, string, the following are the names of common buttons
|
Return value | button object | object |
Example | Example 1: If the obtained toolbar object is defined as toolbar , get the mail button in the toolbar
Example 2: Get the mail button in the toolbar in a general report _g().getToolbar().getWidgetByName("email"); | |
Application example | After the data entry is successful, the toolbar hides the "Mail" and "Print" buttons: Click to download template: | |
Mobile | Not support mobile terminal |
toolBarFloat
Method | toolBarFloat(direction) | Set the toolbar display position |
---|---|---|
Parameter | direction: string | Display method
|
Return value | void | |
Example | Example 1: If the obtained toolbar object is defined as toolbar , set the toolbar to be displayed in the center
Example 2: Set the toolbar to be centered in a general report _g().getToolbar().toolBarFloat('center'); | |
Application example | In a general report, set the toolbar to be centered: Click to download the template: | |
Mobile | Not support mobile terminal |
setStyle
Method | setStyle(style) | Modify toolbar size |
---|---|---|
Parameter | style: { width: number, height: number } | Toolbar size,json format
|
Return value | void | |
Example | Example 1: If the acquired toolbar object is defined as toolbar , modify the toolbar size to be 900 in width and 60 in height
Example 2: Modify the size of the toolbar in a general report to be 900 wide and 60 high
| |
Application example | In a general report, set the toolbar width to 900 and height to 60: Click to download the template: | |
Mobile | Not support mobile terminal |
setVisible
Method | setVisible(visbility) | Set toolbar visible/invisible |
---|---|---|
Parameter | visbility: boolean | Whether toolbar is visible, boolean
|
Return value | void | |
Example | Example 1: If the obtained toolbar object is defined as toolbar , the toolbar is invisible
Example 2: Toolbar is invisible in general report _g().getToolbar().setVisible(false); | |
Application example | Toolbar is invisible in general report: Click to download the template: | |
Mobile | Not support mobile terminal |