Skip to content

TWebToast

Description

TWebToast is a non-visual component that enables to show Bootstrap 4.x unobtrusive toast messages on the browser window. Therefore, to use TWebToast, make sure to add the Bootstrap 4.x library and jQuery 3.x library.

Designtime Runtime

Properties for TWebToast

Property Description
AutoHideDelay Sets the time (in milliseconds) for a toast message to automatically hide (when enabled)
Container Sets an optional container control that is used to control the position where the toast message will display
Items Collection of toast message items of type TToastItem
Position Sets the position where the toast messages will appear on the screen
tpAbsolute : uses the X,Y properties to set the absolute position
tpTopLeft : toast messages appear in the top left corner
tpTopRight : toast messages appear in the top right corner
tpBottomLeft : toast messages appear in the bottom left corner
tpBottomRight : toast messages appear in the bottom right corner
tpContainer : toast messages appear within the specified container control

Events for TWebToast

Event Description
OnHide Event triggered when the toast message hides.
OnShow Event triggered when the toast message shows, returning the toast HTML element allowing further customizaiton.

Properties for TToastItem

Property Description
AutoHide When true, the item will automatically hide after a delay set via TWebToast.AutoHideDelay
Body Sets the body text for the toast item
CloseButton When true, a close button will appear in the top right corner of the toast message
Header Sets the header text for the toast item
Tag Gets or sets the tag for an item
Time Sets the type of the time displayed in the toast message:
ttNone: no time is displayed
ttShow: shows the absolute time when the toast message is displayed
ttDeltaShow: shows the time difference between the current time and the time at which the toast message was displayed

Methods for TToastItem

Method Description
Show Shows the toast message on the screen
Hide Hides the toast message from the screen
Update When properties change for an existing TWebToastItem that is already displayed, call WebToastItem.Update