PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
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 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 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 current pane can be retrieved or modified by ..Value.
  • To find out the aliases of opened dynamic panes, all you have to do is call EnumControl on the Tab pane:
    // 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.
Components
WINDEVReports and Queries wd230obj.dll
Minimum required version
  • Version 20
This page is also available for…
Comments
Click [Add] to post a comment