Successfully!

Error!

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

Toolbar Interface

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

MethodgetWidgetByName(name)Get the button in the report toolbar, which can be used in combination with the button method
  Parametername: string

Button name, string, the following are the names of common buttons

  • submit:submit button

  • verify:Data verification

  • first:First page

  • previous:Previous page

  • next:Next page

  •  last:Last page

  • flashprint:print(client)

  • email:email

  • PDF:pdf

  • pagenavi :Current Page/Total Pages

  • stash:Temporary storage

  • clear:Clear all

Return valuebutton objectobject
   Example

Example 1: If the obtained toolbar object is defined as toolbar , get the mail button in the toolbar

toolbar.getWidgetByName("email");

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: 

Toolbar buttons are invisible.cpt

1.gif

MobileNot support mobile terminal

toolBarFloat

MethodtoolBarFloat(direction)Set the toolbar display position
  Parameterdirection: string

Display method

  • left:Display left

  • right:Display right

  • center:Display center

Return valuevoid
   Example

Example 1: If the obtained toolbar object is defined as toolbar , set the toolbar to be displayed in the center

toolbar.toolBarFloat('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: 

Toolbar centered.cpt

2.png

MobileNot support mobile terminal

setStyle

MethodsetStyle(style)Modify toolbar size
  Parameterstyle:

{

    width: number,

    height: number

}

Toolbar size,json format

  • width: toolbar width

  • height: toolbar height

Return valuevoid
   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

toolbar.setStyle({
    width: 900,
    height: 60
});

Example 2: Modify the size of the toolbar in a general report to be 900 wide and 60 high

_g().getToolbar().setStyle({
    width: 900,
    height: 60
});

Application

example

In a general report, set the toolbar width to 900 and height to 60:

Click to download the template: 

Modify toolbar size.cpt

3.png

MobileNot support mobile terminal

setVisible

MethodsetVisible(visbility)Set toolbar visible/invisible
  Parameter

visbility: boolean

Whether toolbar is visible, boolean

  • true: toolbar is visible

  • false: toolbar is invisible

Return valuevoid
   Example

Example 1: If the obtained toolbar object is defined as toolbar , the toolbar is invisible

toolbar.setVisible(false);

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: 

Hide toolbar.cpt

4.png

MobileNot support mobile terminal


Attachment List


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

Doc Feedback