General API for Component

  • Last update:  2022-02-17
  • Note: The interface on this page applies to absolute canvas blocks, report blocks, tab blocks, chart blocks, and widgets in the body.

    invisible

    Methodinvisible()Set component invisible
      Parameter--
    Return valuevoid
       Example

    Example 1: If the obtained component is defined as widget , set it to be invisible

    widget.invisible();

    Example 2: Get the report block whose component name is "report0" in the dashboard and hide it

    _g().getWidgetByName('report0').invisible();

    Example 3: Get the chart block with the chart name "chart0" in the dashboard and hide it

    _g().getWidgetByName('chart0').invisible();

    Application

    example

    Customize a button "Hide Standard Earning Summary Form", and hide the "Standard Earnings Summary" form when the button is clicked:

    Click to download the template:

    Hide and Show Component.frm

    1.gif

    MobileSupport mobile terminal

    visible

    Methodvisible()Set component visible
      Parameter--
    Return valuevoid
       Example

    Example 1: If the obtained component is defined as widget , set it to be visible

    widget.visible();

    Example 2: Get the report block whose component name is "report0" in the dashboard and show it

    _g().getWidgetByName('report0').visible();

    Example 3: Get the chart block with the chart name "chart0" in the dashboard and show it

    _g().getWidgetByName('chart0').visible();

    Application

    example

    Customize a button "Show Standard Earning Summary Form", and show the "Standard Earnings Summary" form when the button is clicked:

    Click to download the template:

    Hide and Show Component.frm

    2.gif

    MobileSupport mobile terminal

    setVisible

    MethodsetVisible(visibility)
    Set component visible/invisible
      Parametervisibility: boolean

    Whether component is visible,boolean

    • true:visible

    • false:invisible

    Return valuevoid
       Example

    Example 1: If the obtained component is defined as widget , set it to be invisible

    widget.setVisible(false);

    Example 2: Get the report block whose component name is "report0" in the dashboard and hide it

    _g().getWidgetByName('report0').setVisible(false);

    Example 3: Get the chart block with the chart name "chart0" in the dashboard and hide it

    _g().getWidgetByName('chart0').setVisible(false);

    Application

    example

    After hiding the Standard Earnings Summary table, click the button to make it appear:

    Click to download the template:

    Hide and Show Component.frm

    3.gif

    MobileSupport mobile terminal

    isVisible

    MethodisVisible()Return whether the component is visible
      Parameter-

    -

    Return value

    boolean

    Whether component is visible,boolean

    • true:visible

    • false:invisible

       Example

    Example 1: If the obtained component is defined as widget , return whether it is visible or not

    widget.isVisible();

    Example 2: Get the report block whose component name is "report0" in the dashboard, and return whether it is visible or not

    _g().getWidgetByName('report0').isVisible();

    Example 3: Get the chart block with the chart name "chart0" in the dashboard, and return whether it is visible or not

    _g().getWidgetByName('chart0').isVisible();

    Application

    example

    Click the button to see if the Earnings Summary Table is visible:

    Click to download the template:

    View component visible status.frm

    4.gif

    MobileSupport mobile terminal


    Attachment List


    Theme: Secondary Development
    • Helpful
    • Not helpful
    • Only read

    滑鼠選中內容,快速回饋問題

    滑鼠選中存在疑惑的內容,即可快速回饋問題,我們將會跟進處理。

    不再提示

    10s後關閉

    Get
    Help
    Online Support
    Professional technical support is provided to quickly help you solve problems.
    Online support is available from 9:00-12:00 and 13:30-17:30 on weekdays.
    Page Feedback
    You can provide suggestions and feedback for the current web page.
    Pre-Sales Consultation
    Business Consultation
    Business: international@fanruan.com
    Support: support@fanruan.com
    Page Feedback
    *Problem Type
    Cannot be empty
    Problem Description
    0/1000
    Cannot be empty

    Submitted successfully

    Network busy