AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

Este contenido se ha traducido automáticamente.  Haga clic aquí  para ver la versión en inglés.
Ayuda / WLanguage / Funciones WLanguage / Controles, páginas y ventanas / Funciones de ventanas
  • Parameters passed to the child window to open
  • Window opening mode
  • Position of parent window
  • Opening the same window several times
  • Limitation
  • Closing a window
  • Title of the window to be opened
  • Opening the window of a component
WINDEV
WindowsLinuxJavaReportes y ConsultasCódigo de Usuario (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Código Navegador
WINDEV Mobile
AndroidWidget Android iPhone/iPadIOS WidgetApple WatchMac Catalyst
Otros
Procedimientos almacenados
Opens a non-modal child window. <Page>.OpenChild is also used to:
  • define the display position of child window,
  • pass parameters to the child window.
The following events are run when <Page>.OpenChild is called:
  • "Global declarations" of the child window,
  • control initialization codes (undefined order),
  • processes/events after the call to the <Page>.OpenChild function of the parent window,
  • the child window is displayed.
Remark: By default, the child window retains focus once opened.
Windows This function is available only to simplify the Webification of WINDEV projects. In a WEBDEV website, this function has the same behavior as <Page>.Display.
Ejemplo
// Open the child window named "WIN_EditWindow"
// without positioning and without passing parameters
WIN_EditWindow.OpenChild()
// Open the child window named "WIN_EditWindow".
// The value of the "EDT_EditCustomer" control is passed as parameter to the event
// "Global declarations" of "WIN_EditWindow".
WIN_EditWindow.OpenChild(EDT_EditCustomer)
// -- Event "Global declarations" of "WIN_EditWindow"
// Retrieve the parameters
PROCEDURE WIN_EditWindow(Customer)
Customer.ReadSeek(CustomerName, Customer)
IF Customer.Found() = True THEN
FileToScreen()
ELSE
Error("No customer matches")
END
Sintaxis

Abrir una ventana infantil Ocultar los detalles

<Window>.OpenChild([<Parameter 1> [... [, <Parameter N>]]])
<Window>: Nombre de ventana
  • Name of child window to open.
  • Name and full path of child window (".WDW" file) to open.
<Parameter 1>: Tipo de valor enviado a la ventana (opcional)
First parameter that will be passed to the "Global declarations" event of the window to open. This parameter is passed by value and is considered a variable global to the window.
This parameter cannot be a variable of type array (arrays can only be passed by reference).
<Parameter N>: Tipo de valor enviado a la ventana (opcional)
Nth parameter that must be passed to the "Global declarations" event of the window to open. This parameter is passed by value and is considered a variable global to the window.
This parameter cannot be a variable of type array (arrays can only be passed by reference).
Observaciones

Parameters passed to the child window to open

The parameters are retrieved in the "Global declarations" event of the window. Simply write the following line of code at the start:
PROCEDURE <Window name> (<Parameter1> [, <Parameter2> [, ...]])
These parameters are passed by value, not by reference.
For more details, see Window with parameters.

Window opening mode

The window is opened in non-modal mode:
  • the child window becomes the current window.
  • once the child window is opened, the processes following the call to <Page>.OpenChild in the parent window are run.
  • the user will have the ability to click one of the parent windows of opened window.

Position of parent window

The parent window always remains below the child window, even if the parent window is in edit.
If this situation is not suitable, the child window must be opened by OpenSister (providing that the parent window is a non-modal window).
Reportes y Consultas

Opening the same window several times

  • If the same window is opened several time, we recommend that you use an alias. This alias is used to differentiate between each window.
  • The position of the calling window (relative to the screen or to the parent window) is chosen when the window is described in the editor. If the same window is opened several times (with an alias), the display positions must be modified at each opening (otherwise the windows will be stacked).
  • The number of windows that can be opened simultaneously depends on the available memory.

Limitation

<Page>.OpenChild must not be called in the project initialization code.

Closing a window

A window opened with <Page>.OpenChild can be closed with Close (without parameters) from any event:
  • of the window,
  • of a window control.
If a parent window is closed, its child windows are also closed.

Title of the window to be opened

By default, the window title is the one defined in the editor.
To change the window title, use NextTitle or CurrentTitle.

Opening the window of a component

To open the window of a component, simply use the name of the component window (component included in the project). For example:
OpenChild(ComponentWindow)
If a conflict occurs with a project element, the element name must be prefixed by the component name. For example:
OpenChild(MyComponent.Window)
To use the name of the window in a variable, the name of the component must be specified. For example:
sWindow is string ="MyComponent.MyWindow"
OpenChild(sWindow)
Clasificación Lógica de negocio / UI: Código UI
Componente: wd300obj.dll
Versión mínima requerida
  • Versión 26
Esta página también está disponible para…
Comentarios
Haga clic en [Agregar] para publicar un comentario

Última modificación: 04/10/2024

Señalar un error o enviar una sugerencia | Ayuda local