|
|
|
|
|
- Managing threads
- Successive calls
ToastDisplay (Function) 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 does not take the focus, it is not modal and it 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).
New in version 2025ToastDisplay("This is a Toast message.")
ToastDisplay("This is a Toast message.", toastLong, vaMiddle, haCenter, LightGreen)
Syntax
Defining and displaying a toast Hide the details
ToastDisplay(<Message> [, <Display duration> [, <Vertical alignment> [, <Horizontal alignment> [, <Background color>]]]])
<Message>: Character string Message to display. This message can be multiline <Display duration>: Optional integer Constant indicating the display duration of Toast message: | | toastLong | The Toast message will be displayed during a long period of time. | toastShort (Default value) | The Toast message will be displayed during a short period of time. |
Note: The exact display time depends on the device used. <Vertical alignment>: Optional integer Constant indicating the vertical alignment of message. This alignment is relative: to the window.
| | vaBottom (Default value) | The Toast message is displayed at the bottom. | vaMiddle | The Toast message is displayed in the middle. | vaTop | The Toast message is displayed at the top. |
<Horizontal alignment>: Optional integer Constant indicating the horizontal alignment of the message. This alignment is relative: to the window.
| | haCenter (Default value) | The Toast message is displayed in the center. | haLeft | The Toast message is displayed on the left. | haRight | The Toast message is displayed on the right. |
<Background color>: Optional integer Background color used to display the message. This parameter can correspond to: Remarks Managing threads ToastDisplay can be called from a WLanguage thread (to notify the user of events that occurred during the thread execution for example). Successive calls If ToastDisplay 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 behavior of version 24: toasts are superimposed on top of each other.
Related Examples:
|
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: - NFC - Multimedia control - Brightness - Volume - Wi-Fi - Bluetooth - Toast - Compass - Accelerometer - Camera control - LED - Vibration - Notifications - Drawing functions - Internet
|
|
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…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|