PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Overview
  • How to proceed?
  • The available WLanguage functions
  • Managing a dialog via popups
  • Managing a dialog via cells
  • Managing a dialog via pages
  • Managing a dialog via YesNo and OKCancel
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
With the new Web technologies, the sites can look more like Windows applications and they can display dialog boxes.
In order for the Web user to easily identify the active page, the system for graying the pages is automatically used. The inactive page is grayed, so the active pages can be easily viewed by the Web user.
For example:
The dialog with the Web user can be managed:
How to proceed?

The available WLanguage functions

WEBDEV proposes several functions allowing you to communicate with the Web user:
Versions 12 and later
CellCloseDialog
New in version 12
CellCloseDialog
CellCloseDialog
Hides a cell displayed in the page via CellDisplayDialog.
Versions 12 and later
CellDisplayDialog
New in version 12
CellDisplayDialog
CellDisplayDialog
Displays a cell in a page with a DDW effect (Dim Disabled Windows). This function is used to easily simulate a dialog box in browser code, by using a cell in a page.
Versions 09 and later
OKCancel
New in version 09
OKCancel
OKCancel
Displays a message in a standard dialog box that proposes "OK" and "Cancel" and returns the user's choice.
Versions 12 and later
PageCloseDialog
New in version 12
PageCloseDialog
PageCloseDialog
Closes the current page. This page was opened by PageDisplayDialog. A return value can be returned to the calling page.
Versions 12 and later
PageDisplayDialog
New in version 12
PageDisplayDialog
PageDisplayDialog
Displays a page in modal mode. This function is used to establish a dialog with the user. The page is displayed in the foreground while the opening page is displayed in the background, grayed by the DDW mechanism.
Versions 17 and later
PopupClose
New in version 17
PopupClose
PopupClose
Hides a popup displayed in the page via PopupDisplay.
Versions 17 and later
PopupDisplay
New in version 17
PopupDisplay
PopupDisplay
Displays a popup in a page with a DDW effect (Dim Disabled Windows).
Versions 09 and later
YesNo
New in version 09
YesNo
YesNo
Displays a message in a standard dialog box that proposes "Yes" and "No" and returns the user's choice.
All these functions are used to communicate with the user and take into account the DDW parameters defined by the following functions:
PageActivateDDWEnables or disables the DDW (Dim Disabled Window) when displaying a modal page (the pages used to communicate with the user for example).
PageRateDDWDefines and returns the rate of gray used by DDW.
WEBDEV - Server codeWEBDEV - Browser codeWindows
Versions 17 and later

Managing a dialog via popups

Let's see an example that is used to manage a dialog via a popup found in a page.
To manage a dialog via a popup, you must:
  1. Create a popup in the page that must display the dialog ("Insert .. Popup"). This popup will be used to communicate with the user. This popup must contain:Create a popup in the page that must display the dialog: on the "Creation" pane, in the "Containers" group, click "Popup". This popup will be used to communicate with the user. This popup must contain:
    • a static control used to display the text of dialog.
    • a button used to validate the dialog box.
      The "Style" tab of the description window of the popup is used to define all the requested style options (background image of the popup, ...). See Popup control for more details.
  2. The button for closing the dialog (found in the popup) contains the following code:
    PopupClose()

    PopupClose is used to close the popup.
  3. To communicate with the Web user from the page (from a button of the page for example), all you have to do is use PopupDisplay and specify the name of the popup that will be used for the dialog. This popup is associated with the page or with the page template used by the page.
New in version 17

Managing a dialog via popups

Let's see an example that is used to manage a dialog via a popup found in a page.
To manage a dialog via a popup, you must:
  1. Create a popup in the page that must display the dialog ("Insert .. Popup"). This popup will be used to communicate with the user. This popup must contain:Create a popup in the page that must display the dialog: on the "Creation" pane, in the "Containers" group, click "Popup". This popup will be used to communicate with the user. This popup must contain:
    • a static control used to display the text of dialog.
    • a button used to validate the dialog box.
      The "Style" tab of the description window of the popup is used to define all the requested style options (background image of the popup, ...). See Popup control for more details.
  2. The button for closing the dialog (found in the popup) contains the following code:
    PopupClose()

    PopupClose is used to close the popup.
  3. To communicate with the Web user from the page (from a button of the page for example), all you have to do is use PopupDisplay and specify the name of the popup that will be used for the dialog. This popup is associated with the page or with the page template used by the page.

Managing a dialog via popups

Let's see an example that is used to manage a dialog via a popup found in a page.
To manage a dialog via a popup, you must:
  1. Create a popup in the page that must display the dialog ("Insert .. Popup"). This popup will be used to communicate with the user. This popup must contain:Create a popup in the page that must display the dialog: on the "Creation" pane, in the "Containers" group, click "Popup". This popup will be used to communicate with the user. This popup must contain:
    • a static control used to display the text of dialog.
    • a button used to validate the dialog box.
      The "Style" tab of the description window of the popup is used to define all the requested style options (background image of the popup, ...). See Popup control for more details.
  2. The button for closing the dialog (found in the popup) contains the following code:
    PopupClose()

    PopupClose is used to close the popup.
  3. To communicate with the Web user from the page (from a button of the page for example), all you have to do is use PopupDisplay and specify the name of the popup that will be used for the dialog. This popup is associated with the page or with the page template used by the page.
WEBDEV - Browser codeWindowsLinux

Managing a dialog via cells

Let's see an example that is used to manage a dialog via a cell found in a page. This solution is recommended if a single page of the site must propose a dialog with the Web user.
To manage a dialog via a cell, you must:
  1. Create a cell in the page that must display the dialog. This cell will be used to communicate with the user. This cell must contain:
    • a static control used to display the text of dialog.
    • a button used to validate the dialog box.
  2. The cell (as well as its controls) is invisible. It must also be stackable.
    You have the ability to add controls into the cell if necessary (image, ...).
    Note: To avoid displaying unnecessary scrollbars in the browser, check "Automatic positioning at loading to avoid the scrollbars" ("Details" tab of the cell description). This option is used to automatically position the cell at position (0,0) when loading the page.
  3. The button for closing the dialog (found in the cell) contains the following code:
    CellCloseDialog(CELL_MyCell)

    CellCloseDialog is used to make invisible the cell that was displayed beforehand.
  4. To communicate with the Web user from the page (from a button of the page for example), all you have to do is use CellDisplayDialog and specify the name of the cell that will be used for the dialog.
WEBDEV - Server codeWindows

Managing a dialog via pages

Let's see an example that is used to manage a dialog via a site page. This solution is recommended if several pages of the site must propose a dialog with the Web user. The dialog page can be opened from any page of the site.
To manage a dialog via a page:
  1. Create a page (named PAGE_Info for example). This page will be used to communicate with the user. This page must contain:
    • a cell that defines the dialog box.
    • a static control used to display the text. This static control is contained in the cell.
    • a button used to validate the dialog box. This button is contained in the cell.
      You have the ability to add controls into the cell if necessary (images, ...).
      We advise you to center the page in the browser.
  2. The button for closing the dialog (found in the page) contains the following code:
    PageCloseDialog()

    PageCloseDialog is used to return a value to the page that established the dialog.
  3. To call the dialog page from another page, use PageDisplayDialog and specify the name of the page that must be opened as well as the parameters to pass if necessary. These parameters can be used to dynamically fill the text displayed in the static for example.
WEBDEV - Server codeWEBDEV - Browser codeWindows

Managing a dialog via YesNo and OKCancel

YesNo and OKCancel can also be used to manage a simple dialog with the Web user. These functions are used to ask a question to the Web user who will answer by either "Yes" or "No", or "OK" or "Cancel".
To manage a dialog with the YesNo and OKCancel functions:
1. Include specific internal pages in your project. These internal pages contain the dialog box:
To include these pages, select "File .. New .. Page", "Internal page" tab, "OK/Cancel" or "Yes/No" option. These pages must be saved in your project with the name proposed by default.To include these pages, select "File .. New .. Page", "Internal page", "OK/Cancel" or "Yes/No" option. These pages must be saved in your project with the name proposed by default.To include these pages:
  • Click among the quick access buttons.
  • Click "Page" in the wheel that is displayed. The window for creating a new element is displayed: click "Page" then "Page".
  • The wizard for page creation starts.
  • In the wizard, click "Internal page".
  • Select "OK/Cancel" or "Yes/No". These pages must be saved in your project with the name proposed by default.
2. Use YesNo and OKCancel in the code of the application.
Minimum required version
  • Version 12
Comments
Click [Add] to post a comment