Tab Component API

  • Last update:  2022-02-18
  • getShowIndex

    MethodgetShowIndex()Get the positioning index of the tab page being displayed
      Parameter--
    Return valuenumberThe positioning index of the current tab page, number, starting from 0
       Example

    Example 1: If the obtained tabpane object is defined as tab , obtain the positioning index of the currently displayed Tab page

    tab.getShowIndex();

    Example 2: Obtain the positioning index of the tab page currently displayed by the tabpane0 Tab block in the dashboard

    _g().getWidgetByName("tabpane0").getShowIndex();

    Application

    example

    Customize a button "View Tab Index", click the button to view the current Tab page and the positioning index of the Tab page:

    View Tab index.frm

    Click to download the template:

    1.gif

    MobileSupport mobile terminal

    setTabVisible

    MethodsetTabVisible(name, visibility)Set a tab page to show/hide
      Parameter

    name: string

    visibility: boolean

    string:Tab page component name, string

    visibility:Whether the tab page is displayed, boolean

    • true:display

    • false:hide

    Return value--
       Example

    Example 1: If the obtained tabpane object is defined as tab , hide the tab page whose component name is "Tab1"

    tab.setTabVisible("Tab1",false);

    Example 2: Hide the tab page with the component name "Tab1" in the tabpane0 Tab block in the decision report

    _g().getWidgetByName("tabpane0").setTabVisible("Tab2",false);

    Application

    example

    Customize a button "Hide Inventory Analysis", and hide the tab page titled "Inventory Analysis" when the button is clicked:

    Hide specified Tab.frm

    Click to download the template:

    2.gif

    MobileSupport mobile terminal

    setTitleVisible

    MethodsetTitleVisible(visibility)Set Tab block title to show/hide
      Parametervisibility: boolean

    Whether the tab block title is displayed, boolean

    • true:display

    • false:hide

    Return value--
       Example

    Example 1: If the obtained tablayout object is defined as tab , hide the titles of all Tab pages, that is, the title of the Tab block 

    tab.setTitleVisible(false);

    Example 2: Hide the title of the Tab block corresponding to tablayout0 in the dashboard

    _g().getWidgetByName("tablayout0").setTitleVisible(false);

    Application

    example

    Customize a button "Hide Tab Block Title" to hide the title of the Tab block when the button is clicked:

    Click to download the template:

    Hide Tab Title.frm

    3.gif

    MobileSupport mobile terminal

    showCardByIndex

    MethodshowCardByIndex(index)Show Nth Tab Page
      Parameterindex: number

    The number of tab pages, numbers, starting from 0

    Return value--
       Example

    Example 1: If the obtained tabpane object is defined as tab , display the second Tab page

    tab.showCardByIndex(1);

    Example 2: The second tab page of the tab block corresponding to tablayout0 is displayed in the dashboard

    _g().getWidgetByName("tabpane0").showCardByIndex(1);

    Application

    example

    Customize a button "Display the second Tab page", and display the second Tab page when the button is clicked:

    Click to download the template:

    Display specified Tab.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