PC SOFT

WINDEV的在线文档

  • Overview
  • Handling a tab pane
  • Changing the active tab pane
  • Notes
  • Finding out the active tab pane
  • Tab number
  • Caption of the tab
  • WLanguage functions used to handle the tabs
  • Properties specific to the Tab controls
文档页面当前正在翻译。对于此延迟我们深表歉意。
您可以自愿地帮助我们翻译您想要的文档段落,然后只需通过以下地址与我们联系:info@cn.windev.com
产品
WinDevWebDev-服务器代码WebDev-浏览器代码WinDev Mobile报表和查询
平台
WindowsLinuxWindows MobileWindows PhoneWindows Store appsAndroidAndroid Widget iPhone/iPad
语言
JavaPHPAjax用户代码(MCU)外部语言
数据库
HFSQLHFSQL Client/Server存储过程HF 5.5OLE DBODBC本地访问

Handling a Tab control by programming

Overview
WinDev, WinDev Mobile and WebDev allow you to handle a Tab control by programming. To do so, use the variable of the Tab control in the code.

The variable of the Tab control corresponds to the number of the active pane. This variable is an integer.

Note: Going from a tab to the another one (when the user clicks a tab) is automatically managed.

Handling a tab pane
To handle a tab pane, use the following syntax:

NameTabControl[NumberOfTabPane]..PropertyName = PropertyValue

For example:

TAB_MyTab2】..报表=变灰

Changing the active tab pane
The tab pane #1 (the most on the left) is enabled by default. The current tab can be changed by programming.

To enable a tab pane:

  • Assign the tab with the number of the tab pane to enable:
    NameTabControl = NumberOfTabPane
  • Use ..值.
The number is assigned when describing the tabs: in the list of tabs, the first tab is tab #1, the second tab is tab #2, ...

Notes

  • If the specified tab does not exist, the displayed tab is not modified.
  • A single tab pane can be displayed at a time on the same tab.
  • When changing tab pane:
    • the exit code of the control with focus is run.
    • the entry code of the first editable control in the tab pane is enabled.

Finding out the active tab pane

Tab number

To retrieve the number of the active tab:
  • perform a simple assignment. For example:
    NumActivePane = NameTabControl
  • use ..值

WinDevWindows

Caption of the tab

To retrieve the caption of the active tab, all you have to do is use ..标签 on the tab pane:

For example:

跟踪TAB_Tab1TAB_Tab1】..标签)

..标签 can also be used to modify the caption of the tab pane.

WLanguage functions used to handle the tabs
The following functions are used to manage the characteristics of a Tab control by programming.
控件克隆Clone a tab pane.
列举控件Enumerate the controls associated with a tab.
列举子元素Enumerate the panes of a tab.
控件的选项卡Find out the name of the Tab control associated with a control.

Properties specific to the Tab controls
The following properties are used to manage the characteristics of a Tab control by programming.
图片Used to find out and modify the image associated with a tab pane or with a tab.
To handle the tab pane, use the following notation: <TabName> [<Pane subscript>].
数目Used to find out the number of panes in a tab.

To find out the entire list of WLanguage properties that can be used with a Tab control, see Properties associated with a Tab control.
另见