|
|
|
|
|
ToastDisplayIW (Function) In french: ToastAfficheFI Opens a toast notification whose content is based on an internal window.
MonToast is Toast
MonToast.DisplayDuration = toastLong
MonToast.VerticalAlignment = vaBottom
MonToast.HorizontalAlignment = haCenter
ToastDisplayIW(FI_TOAST_SUPPR, MonToast, PRODUIT.NOM)
PROCEDURE FI_TOAST_SUPPR(nomProduit)
LIB_TEXTE = StringBuild("Le produit %1 a été supprimé", nomProduit)
Syntax
Display a toast based on an internal window (via the Toast variable) Hide the details
ToastDisplayIW(<Internal window> [, <Toast> [, <Parameter 1> [... [, <Parameter N>]]]])
<Internal window>: Name of the internal window Name of the internal window used for the toast. If this is the only parameter specified, the toast based on the internal window will be displayed at the default position (bottom) with the default display time (short). <Toast>: Toast optional variable Name of the Toast variable that describes the characteristics of the toast. Note: The Title, Text and Button properties of variable type Toast are not taken into account.. <Parameter 1>: Type corresponding to the parameter (optional) First parameter to be passed to the internal window. This parameter is passed to the "Global declarations" event of the internal window <Parameter N>: Type corresponding to the parameter (optional) Nth parameter to be passed to the internal window. This parameter is passed to the "Global declarations" event of the internal window
Defining and displaying a toast based on an internal window Hide the details
ToastDisplayIW(<Internal window> [, <Display duration> [, <Vertical alignment> [, <Horizontal alignment> [, <Background color>]]]])
<Internal window>: Name of the internal window Name of the internal window used for the toast. If this is the only parameter specified, the toast based on the internal window will be displayed at the default position (bottom) with the default display time (short). <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: Please note: In order to change the background color of the internal window, it is necessary to use the "Transparent" background color in the editor. Remarks Operating mode - The content of the controls in the internal window (text, etc.) must be initialized before calling ToastDisplayIW. The first syntax allows you to pass parameters to the internal window if necessary.
- If ToastDisplayIW is used to display several toasts at once, the different toasts and will be displayed one after the other (when the first toast is closed, the next toast will be displayed). This behavior can be changed using the Overlayable property of the Toast variable.
- By default, the size of the toast corresponds the size of the source internal window. This size can be modified/adapted in the "Initialization" event of the source internal window.
Related Examples:
|
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.
|
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|