|
|
|
|
|
- Overview
- Programming in WLanguage
- Available functions and properties
- Passing parameters to an internal window
- Operating mode of groups of controls
- Example: File picker created via an internal window
- Getting the default value of the file picker
- Transmitting the value typed in the internal window
Manipulating Internal Window controls programmatically
The "Internal Window" control is used to display an existing internal window. Several operations can be performed on the Internal Window control programmatically. Warning: Do not confuse "Internal Window Field" and "Internal Window": the "Internal Window" field is a field type, and the "Internal Window" is a window type.
Available functions and properties The following WLanguage functions and properties are available: - WLanguage functions:
| | ChangeSourceWindow | Dynamically changes the window displayed in an Internal Window control. During this modification, parameters can be passed to the new internal window. | WinUsefulSize | Dynamically changes the useful size of the internal window displayed in an Internal Window control.
|
- WLanguage property:
| | SourceWindow | Used to find out the source of an internal window (which means the internal window displayed by the Internal Window control). |
Passing parameters to an internal window To pass parameters to an internal window, we advise you to: - Create an initialization procedure in the internal window.
- Call this procedure in the window that contains the "Internal Window" control.Example:
// -- Initialization code of WIN_Window1 // IW_MyInternalWin is a control of WIN_Window1 // That is linked to an internal window // This internal window includes a procedure named Init() IW_MyInternalWin.Init(Param1, Param2)
Note The ChangeSourceWindow function can be used to dynamically change the internal window displayed in an internal window field. During this modification, you have the ability to pass parameters to the internal window. Operating mode of groups of controls The groups of controls are global to the window and to its internal windows. The groups of controls found in two internal windows displayed in the same window are not differentiated. Therefore, hiding a group of controls found in an internal window can also hide the controls found in another internal window if the internal windows use the same name for the groups of controls. Example: File picker created via an internal window Getting the default value of the file picker To get the default value of the file picker in the internal window: - In the initialization code of the host window for example, initialize the value of the internal window:
IW_InternalWindow1 = "C:\temp"
- In the "Set the Value property" event of the internal window, retrieve the value and assign it to the Edit control of the file picker:
EDT_DirEdit = MySelf.Value
Transmitting the value typed in the internal window To transmit the value typed by the user to the host window: - In the "Get the Value property" event of the internal window, enter:
- In the host window, retrieve the value of the internal window control:
Info(IW_InternalWindow1.Value)
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|