PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK
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
Opens a new pane in a dynamic Tab control.
Example
NewPane is Control
NewPane <- TabOpen(TAB_DynTab, "New document", IW_Document)
NewPane..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 Tab control to use. If the Tab control is not dynamic, the function fails and returns a WLanguage error.
<Caption>: Character string (with quotes)
Caption of button in the created tab pane.
<Internal window>: Character string (with or without quotes)
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 by ..WindowIfNew).
If the internal window is empty, an empty pane is generated.
<Parameter 1>: Type corresponding to the parameter (optional)
First parameter that will 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 that will 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 by ..Image. For example:
    TAB_Tab[AliasName]..Image = "xxxx.png"
  • The caption associated with the tab pane can be modified by ..Caption. For example:
    TAB_Tab[AliasName]..Caption = "Customer xxxx *"
    Versions 21 and later
    ..MaxButtonWidth is used to define the maximum width of displayed caption. If the caption exceeds this width, an ellipsis is displayed at the end ("...").
    New in version 21
    ..MaxButtonWidth is used to define the maximum width of displayed caption. If the caption exceeds this width, an ellipsis is displayed at the end ("...").
    ..MaxButtonWidth is used to define the maximum width of 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(TAB_DynTab[AliasName], "MyIW")
  • The alias of the current pane can be retrieved or modified by ..Value.
  • To find out the aliases of the open dynamic panes, simply call EnumControl on the Tab control:
    // Fill a combo box with the list of window controls
    i is int = 1
    ResControl is string
    ResControl = EnumControl(TAB_MyTab, i)
    WHILE ResControl <> ""
    i++
    Trace(ResControl)
    ResControl = EnumControl(TAB_MyTab, 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:
    // Handle a control found in an internal window of a pane
    gsAlias is string = TabOpen(TAB_NoName1, "Initial caption", IW_Internal)
    x is Control <- TAB_NoName1[gsAlias]
    x.IW_Internal.EDT_NoName1..Width = 500
  • To run a procedure of an internal window of a pane, use ExecuteProcess.
    Example:
    // Run a procedure of an internal window of a pane
    gsAlias is string = TabOpen(TAB_NoName1, "Initial caption", IW_Internal)
    ExecuteProcess("TAB_NoName1[" + gsAlias + "]", "MyInternalProcedure", 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 : wd250obj.dll
Minimum version required
  • Version 20
This page is also available for…
Comments
Alternar entre Abas da TAB
Buttom Code Insert:

TAB_Cadastro[2]..Visible = True

SetFocus(EDT_ID)

Buttom Code Save:

TAB_Cadastro[2]..Visible = false
BOLLER
10 May 2019