visible
| Method | visible() | Set a toolbar button visible |
|---|---|---|
| Parameter | - | - |
| Return value | void | |
| Example | Example 1: If the obtained toolbar button object is defined as button , set the button to be visible: Example 2: Set the "Mail" button visible in a general report: _g().getToolbar().getWidgetByName("email").visible(); | |
Application example | After the data entry is successful, the "Email" and "Print" buttons will appear on the toolbar: Click to download the template: Toolbar buttons are visible.cpt
| |
| Mobile | Not support mobile terminal | |
invisible
| Method | invisible() | Set a button in the toolbar invisible |
|---|---|---|
| Parameter | - | - |
| Return value | void | |
| Example | Example 1: If the obtained toolbar button object is defined as button , set the button to be invisible Example 2: Setting the "Mail" button to be invisible in a general report _g().getToolbar().getWidgetByName("email").invisible(); | |
Application example | After the data entry is successful, the toolbar hides the "Email" and "Print" buttons: Click to download template: Toolbar buttons are invisible.cpt
| |
| Mobile | Not support mobile terminal | |
setVisible
| Method | setVisible(visibility) | Set a toolbar button to be visible/invisible |
|---|---|---|
| Parameter | visibility: boolean | Whether visible,boolean
|
| Return value | void | |
| Example | Example 1: If the obtained toolbar button object is defined as button , set the button to be invisible Example 2: Setting the "Mail" button to be invisible in a general report _g().getToolbar().getWidgetByName("email").setVisible(false); | |
Application example | After the data entry is successful, the toolbar hides the "Email" and "Print" buttons: Click to download the template: Toolbar buttons are invisible.cpt
| |
| Mobile | Not support mobile terminal | |
isVisible
| Method | isVisible() | Whether a button in the toolbar is visible |
|---|---|---|
| Parameter | - | - |
| Return value | boolean | Whether visible, boolean
|
| Example | Example 1: If the obtained toolbar button object is defined as button , return whether the button is visible Example 2: In a general report, return the current display status of the "Mail" button _g().getToolbar().getWidgetByName("email").isVisible(); | |
Application example | When the "Mail" button is not visible, a pop-up window reminds that sending mail is currently not supported: Click to download the template: Whether toolbar button is visible.cpt
| |
| Mobile | Not support mobile terminal | |
setEnable
| Method | setEnable(enabled) | Set a toolbar button to be enabled/disabled |
|---|---|---|
| Parameter | enabled: boolean | Whether enabled, boolean
|
| Return value | void | |
| Example | Example 1: If the obtained toolbar button object is defined as button , set this button to be disabled Example 2: Setting the "Mail" button to be disabled in a general report _g().getToolbar().getWidgetByName("email").setEnable(false); | |
Application example | After the data entry is successful, the "Mail" and "Print" buttons on the toolbar will be displayed semi-transparently, and they will be disabled if you click: Click to download the template: Toolbar buttons are disabled.cpt
| |
| Mobile | Not support mobile terminal | |
isEnabled
| Method | isEnabled() | Whether a button in the toolbar is enabled |
|---|---|---|
| Parameter | - | - |
| Return value | boolean | whether enabled, boolean
|
| Example | Example 1: If the obtained toolbar button object is defined as button , return whether the button is enabled Example 2: In a general report, return whether the "Mail" button is enabled _g().getToolbar().getWidgetByName("email").isEnabled(); | |
Application example | When the "Mail" button is disabled, a pop-up window reminds that sending mail is currently not supported: Whether toolbar button is enabled.cpt Click to download the template:
| |
| Mobile | Not support mobile terminal | |
