|
|
|
|
|
TabOpen (Function) In french: OngletOuvre Opens a new pane in a Dynamic Tab control. 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 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:
TAB_Tab[AliasName]..Image = "xxxx.png"
- The caption associated with the tab pane can be modified with the Caption property. For example:
TAB_Tab[AliasName].Caption = "Customer 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(TAB_DynTab[AliasName], "MyIW") - 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:
// 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(gsAlias + ".MyInternalProcedure", trtProcédure)
Related Examples:
|
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.
|
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|