PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN
This content has been translated automatically. Click here to view the French version.
  • Characteristics of the popup window
  • Parameters passed to the window to open
  • Limits
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Opens a popup window and waits for this window to be closed. This function must be used in the code of a control (click code of button for example).
Remark: To customize the position of the popup, use the OpenPopupPosition function.
Example
// Ouverture d'une fenêtre de sélection de couleur
MaCouleur is int
MaCouleur = OpenPopup(FEN_CouleurFenSélecteur)
// Si une couleur a été sélectionnée
// (nCouleur <= 0 si on annule la fenêtre)
IF MaCouleur > 0 THEN
// Changement de couleur du rectangle du bouton
BTN_Couleur.Libellé = gRectangle(0, 0, 72, 16, MaCouleur, 0)
END
Syntax
<Result> = OpenPopup(<Window name> [, <Parameter 1> [... [, <Parameter N>]]])
<Result>: Type corresponding to the retrieved value (optional)
Value returned by the popup window when it is closed. This value is returned:
  • by the RETURN keyword in the "Closing" event associated with the window,
  • by the ferme function,
  • by the ReturnedValue property used before closing the window.
<Window name>: Character string
Name of window to open.
<Parameter 1>: Type of value sent to the window (optional)
First parameter that will be passed to the "Global declarations" event of the window to open. These parameters are passed by reference and are considered as global variables to the window.
<Parameter N>: Type of value sent to the window (optional)
Nth parameter that must be passed to the "Global declarations" event of the window to open. These parameters are passed by reference and are considered as global variables to the window.
Remarks

Characteristics of the popup window

  • The window is automatically closed when it loses focus or during the call to ferme. The current value is returned to the control that opened the popup window by one of the following methods:
    • by the RETURN keyword in the "Closing" event associated with the window,
    • by the ferme function,
    • by the ReturnedValue property used before closing the window.
  • The style of the popup windows is applied to the window opened by OpenPopup. If a title bar was defined in the editor, this title bar is reduced and the window cannot be maximized or minimized.
  • The popup window is opened below the control that calls OpenPopup. If there is not enough space to open the window, the window will be opened either above the control, or below the control to the left.

Parameters passed to the window to open

The parameters are retrieved in the event "Global declarations" of the window. The first line of code of this event must correspond to the following line:
PROCEDURE <Nom de la fenêtre> (<Paramètre1> [, <Paramètre2> [, ...]])
For more details, see Window with parameters.

Limits

  • OpenPopup must be executed from the code of a control.
  • The control that calls OpenPopup must be visible.
  • Non-modal windows cannot be opened from a popup window. Open up must be used to open a window. Opening a modal window from a popup window does not automatically close the popup window. In this case, you must process the return value of Open up and you must use ferme to close the popup window.
  • A popup window cannot be opened from a popup window.
Related Examples:
Popup calendar Unit examples (WINDEV Mobile): Popup calendar
[ + ] Implementing a calendar popup for date selection.
Component: wd270obj.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment