PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK
New WINDEV 25 feature!
  • Properties specific to the description of Toast variables
  • WLanguage functions that use Toast variables
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
The Toast type allows you to define all the advanced characteristics of a toast notification. The characteristics of this toast can be defined and modified using different WLanguage properties.
Remark: See Declaring a variable for more details on the declaration of this type of variable and the use of WLanguage properties.
Example
MyToast is Toast
MyToast..Title = "Did you know?"
MyToast..Text = "AAFs are really cool."
MyToast..Button[1].Title = "Learn more..."
MyToast..Button[1].ActionClick = FoncHelp
ToastDisplay(MyToast)
INTERNAL PROCEDURE FoncHelp
Open ("WIN_Help")
END
// Displays a toast without the product name
MyToast is Toast
MyToast..DisplayDuration = toastLong
MyToast..VerticalAlignment = vaBottom
MyToast..HorizontalAlignment = haCenter
ToastDisplayIW(IW_TOAST_DELETE, MyToast, PRODUCT.NAME)
 
//------------------------------------
// Global declarations of the internal window
PROCEDURE IW_TOAST_DELETE(ProductName)
STC_TEXT = StringBuild("The product %1 has been deleted", ProductName)
Remarks

Properties specific to the description of Toast variables

The following properties can be used to handle a toast notification:
Property nameType usedEffect
Button[n]Buttons displayed in the toast.
Button[n]..ActionClickAction to perform when the button is clicked on.
Button[n]..CaptionButton caption.
HorizontalAlignmentInteger constantHorizontal alignment of the message, relative to the window:
  • haCenter (Default value): The Toast message is displayed in the center.
  • haRight: The Toast message is displayed on the right.
  • haLeft: The Toast message is displayed on the left.
VerticalAlignmentInteger constantVertical alignment of the message, relative to the window:
  • vaBottom (Default value): The Toast message is displayed at the bottom.
  • vaTop: The Toast message is displayed at the top.
  • vaMiddle: The Toast message is displayed in the middle.
BackgroundColorIntegerBackground color used to display the message. This parameter can correspond to:
DisplayDurationInteger constantDisplay duration of toast notification:
  • toastShort (Default value): The Toast message will be displayed during a short period of time.
  • toastLong: The Toast message will be displayed during a long period of time.
Remark: The exact display duration depends on the device used.
CloseOnClickBooleanManage closing of toast:
  • True: the toast closes automatically if the user clicks on it,
  • False: the toast closes after the specified display time.
OpacityIntegerOpacity level of the toast with a value between 0 and 100:
  • 0, default value, transparent toast,
  • 100, for a toast with maximum opacity.
OverlayableBoolean
  • True (default value): if several toasts are displayed, they overlap each other.
  • False: if several toasts are displayed, they overlap each other (compatible version 24).
TextCharacter stringMessage to display.
TitleCharacter stringToast title.

Remark: These properties can be handled by using one of the following syntaxes:
  • <Variable name>..<Property name>
  • <Variable name>.<Property name>

WLanguage functions that use Toast variables

Versions 16 and later
ToastDisplay
New in version 16
ToastDisplay
ToastDisplay
Displays a "Toast" message.
Versions 25 and later
ToastDisplayIW
New in version 25
ToastDisplayIW
ToastDisplayIW
Opens a toast whose content is based on an internal window.
Minimum version required
  • Version 25
This page is also available for…
Comments
Click [Add] to post a comment