ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Standard functions / Windows functions / Toast functions
  • Managing threads
  • Successive calls
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
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 does not take focus, is not modal and does not interrupt application execution.
The display of toasts is recommended for conveying information to the user without blocking execution of the application (e.g. displaying a message to indicate the end of a download).
Toast messages in Android
New in version 2025
WINDEV Default toast display improved. By default:
  • the corners of the toast are automatically rounded.
  • an outer margin is defined between the edge of the toast and the edge of the parent don.
  • toast opening and closing animation corresponds to the animation defined in the project options ("Field animations" option, in the "Advanced" tab of the project description).
WINDEVAndroidiPhone/iPad
MonToast is Toast
MonToast.Title = "Le saviez-vous ?"
MonToast.Text = "Les FAA sont un truc génial."
MonToast.Button[1].Caption = "En savoir plus..."
MonToast.Button[1].ActionClick = FoncAide
MonToast.ActionClose = clicFerme
MonToast.Display()
INTERNAL PROCEDURE FoncAide
	Open("FEN_Aide")
END
INTERNAL PROCEDURE clicFerme(nBouton)
	Trace("Clic fermeture, bouton " + nBouton)
END
Syntax
<Toast>.ToastDisplay()
<Toast>: Toast variable
Name of the Toast variable that defines the toast to be displayed.
Remarks

Managing threads

<Toast>.Display can be called from a WLanguage thread (to notify the user of events that occurred during the thread execution for example).

Successive calls

If <Toast>.Display 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 restores the behaviour of version 24: the toasts are superimposed one on top of the other.
iPhone/iPad If <Toast>.Display is called several times, only the last call to the function will be taken into account.
Related Examples:
WD Toasts 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
Component: wd300obj.dll
Minimum version required
  • Version 25
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 03/14/2025

Send a report | Local help