PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Managing 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.
The Toast is a furtive message that appears during a few seconds on the screen before disappearing with a fade-in effect without any user intervention. A Toast message does not take focus, it is not modal and it does not interrupt the execution of application.
The display of Toasts is recommended to transmit information to the user without locking the execution of application (example: displaying a message to indicate the end of download).
Toast message in Android
Linux This function is available for the Linux WEBDEV sites only.
Versions 17 and later
WINDEVWindows This function is now available for the WINDEV applications in Windows.
New in version 17
WINDEVWindows This function is now available for the WINDEV applications in Windows.
WINDEVWindows This function is now available for the WINDEV applications in Windows.
Versions 18 and later
Android Widget This function is now available in Android Widget mode.
WEBDEV - Browser code This function is now available in Browser code.
WEBDEV - Server code This function is now available in WEBDEV Server (Windows and Linux).
PHP This function is now available for the PHP sites.
Universal Windows 10 App This function is now available in Windows Store apps mode.
New in version 18
Android Widget This function is now available in Android Widget mode.
WEBDEV - Browser code This function is now available in Browser code.
WEBDEV - Server code This function is now available in WEBDEV Server (Windows and Linux).
PHP This function is now available for the PHP sites.
Universal Windows 10 App This function is now available in Windows Store apps mode.
Android Widget This function is now available in Android Widget mode.
WEBDEV - Browser code This function is now available in Browser code.
WEBDEV - Server code This function is now available in WEBDEV Server (Windows and Linux).
PHP This function is now available for the PHP sites.
Universal Windows 10 App This function is now available in Windows Store apps mode.
Versions 20 and later
iPhone/iPad This function is now available for the iPhone/iPad applications.
New in version 20
iPhone/iPad This function is now available for the iPhone/iPad applications.
iPhone/iPad This function is now available for the iPhone/iPad applications.
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)
Syntax
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.
Note: The exact display duration depends on the device used.
<Vertical Alignment>: Optional integer
Constant indicating the vertical alignment of message. This alignment is relative:
  • AndroidAndroid Widget iPhone/iPadUniversal Windows 10 App to the screen.
  • WINDEVUniversal Windows 10 App to the window.
  • WEBDEV - Server codeWEBDEV - Browser codePHP to the page.
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:
  • AndroidAndroid Widget iPhone/iPadUniversal Windows 10 App to the screen.
  • WINDEVUniversal Windows 10 App to the window.
  • WEBDEV - Server codeWEBDEV - Browser codePHP to the page.
haCenter
(Default value)
The Toast message is displayed in the center.
iPhone/iPad The toast will always be centered horizontally.
haRightThe Toast message is displayed on the right.
iPhone/iPad This constant is not available.
haLeftThe Toast message is displayed on the left.
iPhone/iPad This constant is not available.
<Background Color>: Optional integer
Background color used to display the message. This parameter can correspond to:
AndroidAndroid Widget Universal Windows 10 App This parameter is not available.
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, the toasts are stacked one above another.
iPhone/iPad If ToastDisplay is called several times, only the last call to the function will be taken into account.
Related Examples:
Android System Android (WINDEV Mobile): Android System
[ + ] This application is a tutorial example presenting some of the new features of WINDEV Mobile for Android.
The following system functions are used:
- NFC
- Multimedia control
- Brightness
- Volume
- WIFI
- Bluetooth
- Toast
- Progress Bar control
- 9-image mode
- Compass
- Accelerometer
- Camera control
- LED
- Vibrations
- Notifications
- Drawing functions
- Internet
Components
WINDEV wd230obj.dll
WEBDEV - Server code wd230page.dll
WEBDEV - Browser code WDJS.DLL
Linux wd230obj.so
Android wd230android.jar
Minimum required version
  • Version 16
This page is also available for…
Comments
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
Jul. 12 2016