Successfully!

Error!

You are viewing 10.0 help doc. More details are displayed in the latest help doc

Toolbar Button General Use

visible

Methodvisible()Set a toolbar button visible
  Parameter

-

-

Return valuevoid
   Example

Example 1: If the obtained toolbar button object is defined as button , set the button to be visible:

button.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

1.gif

MobileNot support mobile terminal

invisible

Methodinvisible()Set a button in the toolbar invisible
  Parameter

-

-

Return valuevoid
   Example

Example 1: If the obtained toolbar button object is defined as button , set the button to be invisible

button.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

2.gif

MobileNot support mobile terminal

setVisible

MethodsetVisible(visibility)Set a toolbar button to be visible/invisible
  Parameter

visibility: boolean

Whether visible,boolean

  • true:visible

  • false:invisible

Return valuevoid
    Example

Example 1: If the obtained toolbar button object is defined as button , set the button to be invisible

button.setVisible(false);

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

3.gif

MobileNot support mobile terminal

isVisible

MethodisVisible()Whether a button in the toolbar is visible
  Parameter

-

-

 Return value

boolean

Whether visible, boolean

  • true:visible

  • false:invisible

    Example

Example 1: If the obtained toolbar button object is defined as button , return whether the button is visible

button.isVisible();

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

4.png

MobileNot support mobile terminal

setEnable

MethodsetEnable(enabled)Set a toolbar button to be enabled/disabled
  Parameter

enabled: boolean

Whether enabled, boolean

  • true:enabled

  • false:disabled

Return valuevoid
    Example

Example 1: If the obtained toolbar button object is defined as button , set this button to be disabled

button.setEnable(false);

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

6.gif

MobileNot support mobile terminal

isEnabled

MethodisEnabled()Whether a button in the toolbar is enabled
  Parameter

-

-

Return value

boolean

whether enabled, boolean

  • true:enabled

  • false:diabled

    Example

Example 1: If the obtained toolbar button object is defined as button , return whether the button is enabled

button.isEnabled();

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:

6.png

Mobile Not support mobile terminal


Attachment List


Theme: 11.0 New Features
Already the First
Already the Last
  • Helpful
  • Not helpful
  • Only read

Doc Feedback