Successfully!

Error!

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

Tab Component Interface

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: 11.0 New Features
Already the First
Already the Last
  • Helpful
  • Not helpful
  • Only read

Doc Feedback