- Managing threads
- Successive calls
In french: ToastAffiche
Displays a "Toast" message.
Toasts are a short messages that appear on the screen for a few seconds before fading out without any user intervention. A Toast message does not gain focus, it is not modal and it does not interrupt the execution of the application.
Toasts are recommended to show information to the user without locking the execution of the application (e.g.: display a message to indicate that the download has been completed).
This function is available for Linux WEBDEV sites only.
ToastDisplay("This is a Toast message.")
ToastDisplay("This is a Toast message.", toastLong, vaMiddle, haCenter, LightGreen)
// Define the font used (gxxx functions)
ToastDisplay(gFontBold() + gFont("Batang") + gFontSize(18) + ...
gPen(LightYellow) + "My custom message", ...
toastShort, vaBottom, haRight, DarkRed)
MyToast is Toast
MyToast.Title = "Did you know?"
MyToast.Text = "AAFs are really cool."
MyToast.Button.Caption = "Learn more..."
MyToast.Button.ActionClick = FuncHelp
MyToast.ActionClose = clickClose
INTERNAL PROCÉDURE FuncHelp
INTERNAL PROCÉDURE clickClose(nButton)
Trace("Click to close. Button: " + nButton)
Defining and displaying a toast Hide the details
ToastDisplay(<Message> [, <Display duration> [, <Vertical alignment> [, <Horizontal alignment> [, <Background color>]]]])
Displaying a toast based on a Toast variable Hide the details
<Toast>: Toast variable
Name of the Toast variable that defines the toast to be displayed.
Remark: The Toast
variable allows you to define additional parameters.
ToastDisplay can be called from a WLanguage thread (to notify the user of events that occurred during the thread execution for example).
is called several times, each toast is displayed once the previous toast has disappeared. This behavior can be changed using the Overlayable
property of the Toast
variable. This property allows you to get the same behavior as in version 24: toasts overlap each other.
is called several times, only the last call to the function will be taken into account.
Cross-platform examples (WINDEV Mobile): WM System
[ + ]
This application is an example of some of the features of WINDEV Mobile available for Android/iOS.
The following system functions are used:
- Multimedia control
- Camera control
- Drawing functions
Training (WINDEV): WD Toasts
[ + ]
This example shows how to use the ToastDisplay and ToastDisplayIW functions as well as Toast variables. A Toast is a temporary message used to inform the user without interrupting the application.
Business / UI classification: UI Code
This page is also available for…