PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Overview
  • Handling a tab pane
  • Changing the active tab pane
  • Notes
  • Finding out the active tab pane
  • Tab number
  • Tab caption
  • WLanguage functions used to handle tabs
  • Properties specific to the Tab controls
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
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 another one (when the user clicks a tab) is automatically managed.
WEBDEV - Server code The different codes for handling the Tab controls are server codes.
Handling a tab pane
To handle a tab pane, use the following syntax:
NameTabControl[NumberOfTabPane]..PropertyName = PropertyValue
For example:
TAB_MyTab[2]..State = Grayed
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 ..Value.
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 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 ..Value
WINDEVWindowsAndroidiPhone/iPadWindows MobileUniversal Windows 10 AppJavaPHP

Tab caption

To retrieve the caption of the active tab, all you have to do is use ..Caption on the tab pane:
For example:
Trace(TAB_Tab1[TAB_Tab1]..Caption)
..Caption can also be used to modify the caption of the tab pane.
WLanguage functions used to handle tabs
The following functions are used to manage the characteristics of a Tab control by programming.
ControlCloneClone a tab pane.
EnumControlEnumerate the controls associated with a tab.
EnumSubElementEnumerate the panes of a tab.
ControlTabFind 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.
ImageUsed 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>].
OccurrenceUsed 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.
See also
Minimum required version
  • Version 9
This page is also available for…
Comments
Example Control TAB Wizard
Working with Screen TABs and Wizards

a) switch between tab via code
b) condition the change from one tab to another
c) make a screen wizard only with a button
d) have a local variable to know the current tab that is on the screen

DOWNLOAD
https://repository.windev.com/publish.awp?file_id=281474976710748;example-alter-tab
BOLLER
Jul. 27 2018