ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / Developing an application or website / Controls, windows and pages / Window
  • Overview
  • Creating a popup window
  • Opening a popup window
  • Automatic opening from a Combo Box control
  • Opening through programming:
  • Position of the popup window
  • Programming the popup window
  • Closing a popup window
  • Principle
  • Popup window and Combo Box control
  • Principle
  • Value returned by the popup window
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
Overview
WINDEV and WINDEV Mobile allow you to open popup windows.
A popup window corresponds to a window that appears when a click is performed on a control and in which the user will be able to select an element.
A popup window can contain all types of controls.
Example of popup window:
Creating a popup window
To create a popup window:
  1. Click in the quick access buttons.
    • The new element window appears: click "Window" then "Window".
    • The window creation wizard starts.
  2. Display the "Standard" tab.
  3. Select "Blank for popup".
  4. Select (if necessary) the skin template of popup window and validate.
Remark: Any other type of window can be used as popup window. In this case:
  • the title bar of the window will be reduced (no title will be displayed).
  • the window cannot be maximized or minimized.
Opening a popup window

Automatic opening from a Combo Box control

No programming is required if the popup window is opened from a Combo Box control. To do so:
  1. Check "Popup window" in the "Content" tab of control.
  2. Select the popup window to open.
Java The popup windows cannot be associated with a Combo Box control.

Opening through programming:

The following functions are used to open a popup window:
OpenPopupOpens a popup window and waits for this window to be closed.
OpenPopupPositionOpens a popup window by specifying its opening position and waits until it is closed.
Java These functions are not available.

Position of the popup window

By default, the popup window appears below the control that opens the popup window (Combo Box control or control that is running OpenPopup)
If there is not enough space to open the popup window, the window will be opened either above the control, or below the control to the left.
OpenPopupPosition is used to precisely configure the opening position of the popup window.
Java This feature is not available.

Programming the popup window

  • The MyPopupControl keyword is used to handle the control that opens a popup window.
  • You have the ability to pass parameters to a popup window. The parameters are retrieved in the "Global Declarations" eventof the popup window. The first line of code of this event must correspond to the following line:
    PROCEDURE <Window name> (<Parameter1> [, <Parameter2> [, ...]])

    For more details, see Window with parameters.
  • A popup window cannot be opened from another popup window.
  • Only a modal window can be opened from a popup window (Open). Opening a modal window from a popup window does not automatically close the popup window. You must process the return value of Open and use Close to close the popup window.
Closing a popup window

Principle

A popup window is automatically closed:
  • as soon as an element is selected.
  • when the window loses focus.
  • when pressing the Esc key on the keyboard.
  • when Close is called.
The value selected by the user is returned to the control that opened the popup window via one of the following methods:
  • using the RETURN keyword in the closing code of the window,
  • by the Close function,
  • by the ReturnedValue property used before closing the window.
Popup window and Combo Box control

Principle

In the Combo Box controls, a popup window can be opened instead of the standard list. To do so, select "Popup window" in the "Content" tab of the control and select the popup window to open.
Remark: To pass parameters to the popup window, you must use OpenPopup.
Java This feature is not available.

Value returned by the popup window

In most cases, the value returned by the popup window corresponds to the value displayed in the Combo Box control.
When closing the popup window, several cases can occur according to the type of the Combo Box control:
  • Non-editable Combo Box control populated programmatically:
    The returned value is sought in the Combo Box control.
    If the value is found, this value is selected in the control.
    If the value is not found, this value is added then selected in the control.
  • Editable Combo Box control populated programmatically:
    The returned value is directly entered in the Combo Box control.
  • Non-editable browsing Combo Box control:
    The returned value must correspond to the value displayed in the Combo Box control.
    The returned value is sought in the control.
    If the value is found, this value is selected in the control.
    If the value is not found, no value is displayed in the control.
  • Editable browsing Combo Box control:
    The returned value is directly entered in the Combo Box control.
Therefore, the value must be returned in the format used by ListAdd. You can use the following format:
RETURN gStoredValue(StoredValue) + DisplayedValue
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 06/14/2023

Send a report | Local help