|
|
|
|
- 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
Handling Sidebar controls programmatically
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
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.
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. | | ControlClone | Clones a control by associating it with a tab of a Sidebar control. | EnumControl | Lists the controls associated with a Sidebar control. | EnumSubElement | Lists 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. | | Count | Gets the number of tabs of a Sidebar control. | Image | Gets 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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|