PC SOFT

WINDEV的在线文档

  • 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
文档页面当前正在翻译。对于此延迟我们深表歉意。
您可以自愿地帮助我们翻译您想要的文档段落,然后只需通过以下地址与我们联系:info@cn.windev.com
产品
WinDevWebDev-服务器代码WebDev-浏览器代码WinDev Mobile报表和查询
平台
WindowsLinuxWindows MobileWindows PhoneWindows Store appsAndroidAndroid Widget iPhone/iPad
语言
JavaPHPAjax用户代码(MCU)外部语言
数据库
HFSQLHFSQL Client/Server存储过程HF 5.5OLE DBODBC本地访问

Overview
WinDev and WinDev Mobile allow you to open windows in popup format.

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.

Popup window example:

Creating a popup window
To create a popup window:
  1. Select "File .. New .. Window". The wizard for wi&ndow creation starts.Clickamong 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. You must:
  1. Check "Popup window" in the "Content" tab of the control.
  2. Select the popup window to open.

Opening by programming:

The following functions are used to open a popup window:
09版本和更高版本
打开弹出式窗口
打开弹出式窗口
Opens a popup window and waits for this window to be closed.
打开弹出式窗口并指定位置Opens a popup window by specifying its opening position and waits until it is closed.

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 打开弹出式窗口).

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.

打开弹出式窗口并指定位置 is used to precisely configure the opening position of the popup window.

Programming the popup window

  • 我的弹出控件 allows you 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 the popup window. To do so, specify the following line at the beginning of the 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 (打开). Opening a modal window from a popup window does not automatically close the popup window. You must process the return value of 打开 and use 关闭 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 关闭.
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 打开弹出式窗口.

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 列表添加. You have the ability to use the following format:
RESULT 图示链接(StoredValue) + DisplayedValue