ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / WLanguage functions / Standard functions / Windows functions / Dialog Box functions
  • Features of the dialog box
  • Line break in the dialog box
  • Miscellaneous
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
Displays a message in a standard non-blocking dialog box with the answers "Yes" and "No" and calls a WLanguage procedure with the user's response.
Yes/No dialog
Remarks:
  • This is a non-blocking dialog box. The WLanguage code that follows the call to YesNoAsynchronous continues to run. To close the window, the user must validate one of the buttons. When the user clicks one of the buttons, the code of a WLanguage procedure is run.
  • In the WLanguage code following the call to the function, another modal window cannot be opened before closing the dialog box.
Example
YesNoAsynchronous("Voulez-vous fermer cette fenêtre ?", MaProcédure_OKAnnuler)

INTERNAL PROCEDURE MaProcédure_OKAnnuler(nReponse int)
	IF nReponse = Yes THEN
		ToastDisplay("Vous voulez fermer la fenêtre !")
	ELSE
		ToastDisplay("Vous ne voulez pas fermer la fenêtre !")
	END
END
Syntax
YesNo([<Selected button>, ] <Text> , <WLanguage procedure>)
<Selected button>: Optional integer constant
Button selected by default in the dialog box:
No0selected by default
Yes
(Default value)
1selected by default
<Text>: Character string
Text to display.
<WLanguage procedure>: Name of the procedure or lambda procedure
Name of the WLanguage procedure ("callback" procedure) called when the user clicks one of the buttons in the confirmation window.
This procedure is used to find out which button was clicked, and to run a specific process if necessary.
For more details on this procedure, see Parameters of the procedure used by YesNoAsynchronous.
This WLanguage procedure can correspond to:
  • a name of a global or local procedure,
  • a name of an internal procedure,
  • a lambda procedure.
Remarks

Features of the dialog box

  • The title of the dialog box corresponds to the title of the current window (or page).
  • To modify or define the title of dialog box, use NextTitle.
  • The message is aligned to the left.
  • The captions of buttons depend on the runtime language of Windows.
  • The maximum number of characters cannot exceed 4096. If a larger string is passed as parameter, it will be truncated.
  • The icon displayed (exclamation mark) cannot be modified.

Line break in the dialog box

The CR string (Carriage Return) can be used to force a break to the next line. For example:
YesNoAsynchronous("La fiche XXX a été modifiée." + CR + ...
	"Voulez-vous la sauver avant de quitter ?")
You also have the ability to use the syntax of multiline strings. For example:
YesNoAsynchronous(
[
La fiche XXX a été modifiée.

Voulez-vous la sauver avant de quitter ?
], Procédure_OKAnnulerAsynchrone)

Miscellaneous

  • Timers (TimerSys) are not stopped when this function is called.
  • The text of the buttons is displayed in the system language.
Business / UI classification: UI Code
Component: wd300obj.dll
Minimum version required
  • Version 25
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 03/28/2025

Send a report | Local help