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
WindowsLinuxUniversal Windows 10 AppJavaReportes y ConsultasCódigo de Usuario (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Código Navegador
WINDEV Mobile
AndroidWidget Android iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
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 Internet user can be managed:
How to?

The available WLanguage functions

WEBDEV proposes several functions allowing you to communicate with the Web user:
CellCloseDialogOculta una control Celda previamente mostrada en la página a través de 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.
OKCancelMuestra un mensaje en un cuadro de diálogo estándar que propone "OK" y "Cancel" y devuelve la elección del usuario.
PageCloseDialogCierra la página actual. Esta página fue abierta por PageDisplayDialog. Un valor de retorno puede ser devuelto a la página de llamada.
PageDisplayDialogMuestra una Page en modo modal. Esta función se utiliza para establecer un diálogo con el usuario. La página se muestra en primer plano mientras que la página de apertura se muestra en segundo plano, Grayed por el mecanismo de OVI.
PopupCloseOculta una ventana emergente que se muestra en la página a través de PopupDisplay.
PopupDisplayMuestra una ventana emergente en una Page con efecto OVI (Oscurecimiento de Ventanas Inactivas).
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 must display the dialog: on the "Creación" tab, in the "Contenedores" 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 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 stackable.
    You have the ability to add controls into the cell if necessary (image, ...).
    Remark: To not display unnecessary scrollbars in the browser, check the option " Forzar posición en la parte superior izquierda de la página al cargarla " ("Advanced" tab of 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 new element window appears: 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: 18/12/2023

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