PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Overview
  • Creating a popup window
  • Opening a popup window
  • Automatic opening from a combo box
  • Opening by programming:
  • Position of the popup window
  • Programming the popup window
  • Closing a popup window
  • Principle
  • Popup window and combo box
  • 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/iPadApple WatchUniversal Windows 10 AppWindows Mobile
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. Select "File .. New .. Window". The wizard for wi&ndow creation starts. Click among the quick access buttons.
    • Click "Window" in the wheel that is displayed. The window for creating a new element is displayed: click "Window" then "Window".
    • The wizard for window creation starts.
  2. Display the "Standard" tab.
  3. Select "Blank for popup".
  4. Select (if necessary) the skin template of the popup window and validate.
Note: 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

No programming is required if the popup window is opened from a Combo Box control. All you have to do is:
  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 by programming:

The following functions are used to open a popup window:
Versions 09 and later
OpenPopup
New in version 09
OpenPopup
OpenPopup
Opens a popup window and waits for this window to be closed.
Versions 09 and later
OpenPopupPosition
New in version 09
OpenPopupPosition
OpenPopupPosition
Opens 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 is opened 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 opened a popup window.
  • You have the ability to pass parameters to a popup window. The parameters are retrieved in the "Declaration process of the global variables" of popup window. To do so, specify the following line at the beginning of process:
    PROCEDURE <Window Name> (<Parameter1> [, <Parameter2> [, ...]])

    See Window with parameters for more details.
  • A popup window cannot be opened from a 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.
  • during the call to Close.
The value selected by the user is returned to the control that opened the popup window via one of the following methods:
Popup window and combo box

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.
Note: 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 memory combo box:
    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 memory combo box:
    The returned value is directly entered in the Combo Box control.
  • Non-editable browsing combo box:
    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:
    The returned value is directly entered in the Combo Box control.
Therefore, the value must be returned in the format used by ListAdd. You have the ability to use the following format:
RESULT gLink(StoredValue) + DisplayedValue
Minimum required version
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment