AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

Este contenido se ha traducido automáticamente.  Haga clic aquí  para ver la versión en inglés.
Ayuda / Desarrollar una aplicación o un sitio web / Controles, ventanas y páginas / Página
  • Overview
  • How to?
  • 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
WindowsLinuxJavaReportes y ConsultasCódigo de Usuario (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Código Navegador
WINDEV Mobile
AndroidWidget Android iPhone/iPadIOS WidgetApple WatchMac Catalyst
Otros
Procedimientos almacenados
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?

The available WLanguage functions

WEBDEV proposes several functions allowing you to communicate with the Web user:
CellCloseDialogHides a Cell control previously displayed in the page via CellDisplayDialog.
CellDisplayDialogDisplays a Cell control 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 control in a page.
OKCancelDisplays a message in a standard dialog box that proposes "OK" and "Cancel" and returns the user's choice.
PageCloseDialogCierra la página actual. Esta página fue abierta por PageDisplayDialog. Se puede devolver un valor de retorno a la página de llamada.
PageDisplayDialogDisplays 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.
PopupCloseHides a popup displayed in the page via PopupDisplay.
PopupDisplayDisplays a popup in a page with a DDW effect (Dim Disabled Windows).
YesNoMuestra un mensaje en un cuadro de diálogo estándar que propone la opciones "Sí" y "No", y devuelve la respuesta del usuario.
All these functions are used to communicate with the user and take into account the DDW parameters defined by the following functions:
PageEnableDDWEnables 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 - Código ServidorWEBDEV - Código NavegadorWindows

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 should display the dialog: under the "Creación" pane, in the "Contenedores" group, click on "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 popup description window is used to define all the desired style options (popup background image, etc.). For more details, see Popup control.
  2. The button for closing the dialog (found in the popup) contains the following code:
    PopupClose()

    PopupClose closes 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 - Código NavegadorWindowsLinux

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 with a cell:
  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 superimposable.
    You have the ability to add controls into the cell if necessary (image, ...).
    Remark: To avoid displaying unnecessary scrollbars in the browser, check the "Forzar posición en la parte superior izquierda de la página al cargarla" option ("Advanced" tab in the Cell control description window).. This option is used to automatically position the Cell control at position (0,0) when loading the page.
  3. The button for closing the dialog (found in the cell) contains the following code:
    CelluleFermeDialogue(CELL_MaCellule)

    CellCloseDialog is used to make the previously displayed cell invisible.
  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 - Código ServidorWindows

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 opened the dialog.
  3. To call the dialog page from another page, use PageDisplayDialog and specify the name of the page to open 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 - Código ServidorWEBDEV - Código NavegadorWindows

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:
  • Click in the quick access buttons.
  • The window for creating a new element is displayed: click "Page" then "Page".
  • The page creation wizard 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.
Versión mínima requerida
  • Versión 12
Comentarios
Haga clic en [Agregar] para publicar un comentario

Última modificación: 21/09/2024

Señalar un error o enviar una sugerencia | Ayuda local