Version
Version | Functional Change |
---|---|
11.0 | Difference from V10.0: No changes, and all the following APIs are supported in V10.0. |

visible
API | visible() | To set a toolbar button on the toolbar to be visible. |
Parameter | - | - |
Returned Value | void | |
Example | Example 1: You can set a button to be visible when the obtained toolbar button object is defined as button.
Example 2: In a general report, you can set the Email button to be visible.
Example 3: In a dashboard, you can set the First button to be visible. _g().getWidgetByName('report0').getToolbar(0).getWidgetByName("first").visible(); | |
Application Example | After successful submission, the Email and Print buttons are displayed on the toolbar. For details, you can download the template Visible Toolbar Button.cpt. | |
Mobile Terminal | This API is not supported on mobile terminals. |
invisible
API | invisible() | To set a button on the toolbar to be invisible. |
Parameter | - | - |
Returned Value | void | |
Example | Example 1: You can set a button to be invisible when the obtained toolbar button object is defined as button.
Example 2: In a general report, you can set the Email button to be invisible.
Example 3: In a dashboard, you can set the First button to be invisible. _g().getWidgetByName('report0').getToolbar(0).getWidgetByName("first").invisible(); | |
Application Example | After successful submission, the Email and Print buttons are hidden on the toolbar. For details, you can download the template Invisible Toolbar Button.cpt. | |
Mobile Terminal | This API is not supported on mobile terminals. |
setVisible
API | setVisible(visibility) | To set a button on the toolbar to be visible or invisible. |
Parameter | visibility: boolean | Visible or not, which is a boolean value.
|
Returned Value | void | |
Example | Example 1: You can set a button to be invisible when the obtained toolbar button object is defined as button.
Example 2: In a general report, you can set the Email button to be invisible.
Example 3: In a dashboard, you can set the First button to be invisible. _g().getWidgetByName('report0').getToolbar(0).getWidgetByName("first").setVisible(false); | |
Application Example | After successful submission, the Email and Print buttons are hidden on the toolbar. For details, you can download the template Invisible Toolbar Button1.cpt. | |
Mobile Terminal | This API is not supported on mobile terminals. |
isVisible
API | isVisible() | To return the visibility status of a specified button on the toolbar. |
Parameter | - | - |
Returned Value | boolean | Visible or not, which is a boolean value.
|
Example | Example 1: The API can return the visibility status of a specified button when the obtained toolbar button object is defined as button.
Example 2: In a general report, the API can return the visibility status of the Email button.
Example 3: In a dashboard, the API can return the visibility status of the First button. _g().getWidgetByName('report0').getToolbar(0).getWidgetByName("first").isVisible(); | |
Application Example | If the Email button is invisible, a pop-up box appears with the prompt "Email sending is currently not supported." For details, you can download the template Whether a Toolbar Button is Visible.cpt. | |
Mobile Terminal | This API is not supported on mobile terminals. |
setEnable
API | setEnable(enabled) | To set a button on the toolbar to be enabled or disabled. |
Parameter | enabled: boolean | Enabled or not, which is a boolean value.
|
Returned Value | void | |
Example | Example 1: You can set a button to be disabled when the obtained toolbar button object is defined as button.
Example 2: In a general report, you can set the Email button to be disabled.
Example 3: In a dashboard, you can set the First button to be disabled. _g().getWidgetByName('report0').getToolbar(0).getWidgetByName("first").setEnable(false); | |
Application Example | After submission, the Email and Print buttons on the toolbar become semi-transparent and are disabled. For details, you can download the template Disabled Toolbar Button.cpt. | |
Mobile Terminal | This API is not supported on mobile terminals. |
isEnabled
API | isEnabled() | To return whether a specified button on the toolbar is enabled. |
Parameter | - | - |
Returned Value | boolean | Enabled or not, which is a boolean value.
|
Example | Example 1: The API can return whether a specified button is enabled when the obtained toolbar button object is defined as button.
Example 2: In a general report, the API can return whether the Email button is enabled.
Example 3: In a dashboard, the API can return whether the First button is enabled. _g().getWidgetByName('report0').getToolbar(0).getWidgetByName("first").isEnabled(); | |
Application Example | If the Email button is disabled, a pop-up box appears with the prompt "The Email button is disabled. Email sending is currently not supported." For details, you can download the template Whether a Toolbar Button is Enabled.cpt. | |
Mobile Terminal | This API is not supported on mobile terminals. |