PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN
This content has been translated automatically. Click here to view the French version.
  • Gestion des threads
  • Successive calls
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
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 message does not take 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).
Toast message in Android
Linux This function is available for Linux WEBDEV sites only.
Versions 17 and later
WINDEVWindows This function is now available for WINDEV applications in Windows.
New in version 17
WINDEVWindows This function is now available for WINDEV applications in Windows.
WINDEVWindows This function is now available for WINDEV applications in Windows.
Versions 18 and later
Universal Windows 10 App This function is now available in Windows Store apps mode.
New in version 18
Universal Windows 10 App This function is now available in Windows Store apps mode.
Universal Windows 10 App This function is now available in Windows Store apps mode.
Versions 21 and later
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
New in version 21
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Example
ToastDisplay("This is a Toast message.")
ToastDisplay("This is a Toast message.", toastLong, vaMiddle, haCenter, LightGreen)
WINDEV
// Customize the font used (gxxx functions)
ToastDisplay(gFontBold() + gFont("Batang") + gFontSize(18) + ...
gPen(LightYellow) + "My custom message", ...
toastShort, vaBottom, haRight, DarkRed)
Versions 25 and later
WINDEV
MyToast is Toast
MyToast.Title = "Did you know?"
MyToast.Text = "AAFs are really cool."
MyToast.Button [1].Label = "More information..."
MonToast.Bouton[1].ActionClic = FoncAide
ToastDisplay(MyToast)
INTERNAL PROCÉDURE FuncHelp
Open("WIN_Help")
END
New in version 25
WINDEV
MyToast is Toast
MyToast.Title = "Did you know?"
MyToast.Text = "AAFs are really cool."
MyToast.Button [1].Label = "More information..."
MonToast.Bouton[1].ActionClic = FoncAide
ToastDisplay(MyToast)
INTERNAL PROCÉDURE FuncHelp
Open("WIN_Help")
END
WINDEV
MyToast is Toast
MyToast.Title = "Did you know?"
MyToast.Text = "AAFs are really cool."
MyToast.Button [1].Label = "More information..."
MonToast.Bouton[1].ActionClic = FoncAide
ToastDisplay(MyToast)
INTERNAL PROCÉDURE FuncHelp
Open("WIN_Help")
END
Syntax

Defining and displaying a toast Hide the details

ToastDisplay(<Message> [, <Display duration> [, <Vertical alignment> [, <Horizontal alignment> [, <Background color>]]]])
<Message>: Character string (with quotes)
Message to display. This message can be multiline
<Display duration>: Optional integer
Constant indicating the display duration of Toast message:
toastShort
(Default value)
The Toast message will be displayed during a short period of time.
toastLongThe Toast message will be displayed during a long period of time.

Remark: The exact display duration depends on the device used.
<Vertical alignment>: Optional integer
Constant indicating the vertical alignment of message. This alignment is relative:
  • Universal Windows 10 App to the screen.
  • WINDEVUniversal Windows 10 App to the window.
vaBottom
(Default value)
The Toast message is displayed at the bottom.
vaTopThe Toast message is displayed at the top.
vaMiddleThe Toast message is displayed in the middle.
<Horizontal alignment>: Optional integer
Constant indicating the horizontal alignment of message. This alignment is relative:
  • Universal Windows 10 App to the screen.
  • WINDEVUniversal Windows 10 App to the window.
haCenter
(Default value)
The Toast message is displayed in the center.
haRightThe Toast message is displayed on the right.
haLeftThe Toast message is displayed on the left.
<Background color>: Optional integer
Background color used to display the message. This parameter can correspond to:
Universal Windows 10 App This parameter is not available.
Versions 25 and later
WINDEV

Displaying a toast based on a Toast variable Hide the details

ToastDisplay(<Toast>)
<Toast>: Toast variable
Name of the Variable of type Toast describing the toast to be displayed.
Remark: The Toast variable allows you to define additional parameters.
New in version 25
WINDEV

Displaying a toast based on a Toast variable Hide the details

ToastDisplay(<Toast>)
<Toast>: Toast variable
Name of the Variable of type Toast describing the toast to be displayed.
Remark: The Toast variable allows you to define additional parameters.
WINDEV

Displaying a toast based on a Toast variable Hide the details

ToastDisplay(<Toast>)
<Toast>: Toast variable
Name of the Variable of type Toast describing the toast to be displayed.
Remark: The Toast variable allows you to define additional parameters.
Remarks

Gestion des threads

The function ToastDisplay can be called from an thread WLanguage (e.g. to notify the user of events occurring during the execution of thread).

Successive calls

If ToastDisplay is called several times, each toast is displayed once the previous toast has disappeared. 0. This property allows you to get the same behavior as in version 24: toasts overlap each other.
Related Examples:
WM_System 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
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: wd260obj.dll
Minimum version required
  • Version 16
This page is also available for…
Comments
Notification
https://repository.windev.com/resource.awp?file_id=281474976710849;notificationdisplay
BOLLER
30 Aug. 2019
Exemplo Toastdisplay
Exemplo Toastdisplay

ToastDisplay("Mensagem que apareça",toastLong,vaTop,haCenter,LightBlue)

ToastDisplay("Outra Mensagem")

//Blog com Video e Exemplo
http://windevdesenvolvimento.blogspot.com.br/2016/07/curso-windev-funcoes-dialogo-4_12.html
https://www.youtube.com/watch?v=m3471CzfOIk
De matos AMARILDO
12 Jul. 2016