ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / WLanguage functions / Controls, pages and windows / Tab functions
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
Opens a new pane in a Dynamic Tab control.
Example
NouvVolet is Control
NouvVolet <- TabOpen(ONG_OngletDyn, "Nouveau document", FI_Document)
NouvVolet.Image = "new.png"
Syntax
<Result> = TabOpen(<Tab control> , <Caption> [, <Internal window> [, <Parameter 1> [... [, <Parameter N>]]]])
<Result>: Character string
Alias of created tab pane. This alias is used to handle the dynamic tab pane.
<Tab control>: Control name
Name of the Tab control to be used. If the Tab control is not dynamic, the function fails and returns a WLanguage error.
<Caption>: Character string
Caption of button in the created tab pane.
<Internal window>: Character string
Name of internal window that will be used in the tab pane. If this parameter is not specified, the default internal window is used (defined in the "Details" tab of the description window or with the WindowIfNew property).
If the internal window is empty, an empty pane is generated.
<Parameter 1>: Type corresponding to the parameter (optional)
First parameter to be passed to the internal window. This parameter is passed to the process for declaring the global variables of internal window.
<Parameter N>: Type corresponding to the parameter (optional)
Nth parameter to be passed to the internal window. This parameter is passed to the process for declaring the global variables of internal window.
Remarks
  • The image associated with the tab pane must can be modified with the Image property. For example:
    ONG_Onglet[NomAlias].Image = "xxxx.png"
  • The caption associated with the tab pane can be modified with the Caption property. For example:
    ONG_Onglet[NomAlias].Libellé = "Client xxxx *"
    The MaxButtonWidth property is used to define the maximum width of the displayed caption. If the caption exceeds this width, an ellipsis is displayed at the end ("...").
  • The internal window used in the pane can be modified by ChangeSourceWindow. For example:
    ChangeSourceWindow(ONG_OngletDyn[NomAlias], "MaFI")
  • The alias of the current pane can be retrieved or modified with the Value property.
  • To get the aliases of the active dynamic tabs, simply call EnumControl on the Tab control:
    // Remplir une combo avec la liste des champs de la fenêtre 
    i is int = 1
    ResChamp is string
    ResChamp = EnumControl(ONG_MonOnglet, i)
    WHILE ResChamp <> ""
    	i++
    	Trace(ResChamp)
    	ResChamp = EnumControl(ONG_MonOnglet, i)
    END
  • You have the ability to handle a control found in an internal window of a pane as soon as the pane is opened.
    Example:
    // Manipulation d'un champ présent dans une fenêtre interne d'un volet
    gsAlias is string = TabOpen(ONG_SansNom1, "Libelle initial", FI_Interne)
    x is Control <- ONG_SansNom1[gsAlias]
    x.FI_Interne.SAI_SansNom1.Largeur = 500
  • To run a procedure of an internal window of a pane, use ExecuteProcess.
    Example:
    // Exécution d'une procédure d'une fenêtre interne d'un volet
    gsAlias is string = TabOpen(ONG_SansNom1, "Libelle initial", FI_Interne)
    ExecuteProcess(gsAlias + ".MaProcedureInterne", trtProcedure)
Related Examples:
WD Multi-Windowing Training (WINDEV): WD Multi-Windowing
[ + ] This example presents the basic concepts for managing the multi-windowing and the dynamic tabs with WINDEV.

This example includes a simple interface for managing the customer forms:
- multi-windowing with MDI interface,
- multi tabs with a dynamic tab control.
Component: wd300obj.dll
Minimum version required
  • Version 20
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 03/27/2025

Send a report | Local help