ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / Developing an application or website / Controls, windows and pages / Controls: Available types / Sidebar control
  • Overview
  • Handling the tabs of a Sidebar control
  • Changing the active tab
  • Getting the active tab
  • WLanguage functions for handling Sidebar controls
  • Properties specific to the tabs of a Sidebar control
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Handling Sidebar controls programmatically
Overview
WINDEV and WINDEV Mobile allow you to handle Sidebar controls programmatically. To do so, use the variable of the Sidebar control in the code.
The variable of the Sidebar control corresponds to the number of the active tab. This variable is an integer.
Remark: WINDEV and WINDEV Mobile automatically manage the transitions when the user clicks the different tabs.
Handling the tabs of a Sidebar control
To handle a tab, use the following syntax:
<Sidebar control>[Tab number].PropertyName = PropertyValue
For example:
SIDE_MyBox[2].State = Grayed
Changing the active tab
Tab 1 (tab at the top) is enabled by default. The active tab can be changed programmatically.
To enable a sidebar tab:
  • Specify the number of the tab to be enabled:
    <Sidebar control> = <Tab number>
  • Use the Value property.
The number is assigned in the tab description: in the list of tabs, the first tab is tab #1, the second tab is tab #2...
Remarks:
  • If the specified tab does not exist, the displayed tab does not change.
  • On a single sidebar, only one tab can be displayed at a time.
  • When changing to another tab:
    • the exit code of the control with focus is run.
    • the entry code of the first editable control in the tab is enabled.
Getting the active tab
To retrieve the number of the active tab:
  • perform a simple assignment. For example:
    <Active pane number> = <Sidebar control>
  • use the Value property.
WLanguage functions for handling Sidebar controls
The following functions are used to manage the characteristics of Sidebar controls.
ControlCloneClones a control by associating it with a tab of a Sidebar control.
EnumControlLists the controls associated with a Sidebar control.
EnumSubElementLists the tabs of a Sidebar control.
Properties specific to the tabs of a Sidebar control
The following properties can be used to programmatically handle tabs in Sidebar controls.
CountGets the number of tabs of a Sidebar control.
ImageGets and sets the image associated with a tab of a Sidebar control.
To handle the tab, use the following syntax: <Sidebar control> [<Tab index>].

For a complete list of WLanguage properties that can be used with Sidebar controls, see Properties associated with a sidebar.
Minimum version required
  • Version 9
Comments
Click [Add] to post a comment

Last update: 07/03/2023

Send a report | Local help