|
|
|
|
|
- Notification example
- Properties specific to sysNotification variables
sysNotification (Variable type) In french: sysNotification
The sysNotification type is used to define all the advanced characteristics of an interactive system notification. You can define and change the characteristics of this notification using different WLanguage properties. Note: For more details on the declaration of this type of variable and the use of WLanguage properties, see Declaring a variable. // Example: Create and send an update notification notifUPD is sysNotification notifUPD.Title = "Update available!" notifUPD.Text1 = "Download now to get the latest features." notifUPD.Note = "UPD_notif" notifUPD.Buttons[1].Caption = "Download" notifUPD.Buttons[1].Note = "UPD_download_button" notifUPD.Buttons[2].Caption = "Later..." notifUPD.Buttons[2].Type = sysNotifReminderButton SysNotificationSend(notifUPD)
Remarks Notification example Here is an example of a notification: - 1. Application icon and name: This information cannot be modified.
- 2. Notification header image (HeaderImagePath property of the sysNotification variable).
- 3. Logo image: Default application logo. This logo can be replaced with an image (LogoImagePath property of the sysNotification variable). You can also crop this image into a circle (LogoImageCrop property of the sysNotification variable).
- 4. Title: Notification title or name (2 lines maximum, Title property of the sysNotification variable).
- 5. Additional text: Two additional text areas, taking no more than a total of 4 lines (Text1 and Text2 properties of the sysNotification variable).
- 6. Date and time the notification was sent (Date property of the sysNotification variable).
- 7. Attribution, which indicates the source of the information: SMS, etc. (Attribution property of the sysNotification variable).
- 8. Image contained in the notification. This optional image is displayed when the notification is expanded (ContentImagePath property of the sysNotification variable).
- 9. Edit control where the user can enter text (defined by the sysNotificationInput variable).
- 10. Combo Box where the user can select an option (defined by the sysNotificationInput variable).
- 11. Simple button, which can perform an action defined by the system or send information back to the calling application (defined by the sysNotificationButton variable). You can also define a context button, which is added to the context menu of the notification (right click).
Note: Simple buttons always appear at the bottom of the notification. However, Edit and Combo Box controls appear in the order they have been defined. Properties specific to sysNotification variables The following properties can be used to handle a system notification: | | | Property name | Type used | Effect |
---|
Action | Global procedure only | Name of the global procedure to be executed when the user clicks the notification itself (not a control inside the notification). If the procedure is not specified or cannot be found, the "Receive a notification" optional project event is executed. | Attribution | Character string | Text to be displayed in the small text area below the notification (for example, this box can be used to indicate the source of the information). This property can be empty. | Buttons | Array of sysNotificationButton | Button controls of the notification. Buttons always appear at the bottom of the notification, from left to right following their order in the array (except for context buttons, which are added to the context menu of the notification, from top to bottom). Note: There can be no more than 5 buttons in a notification. | ContentImagePath | Character string | Absolute path of an image on disk that can be added to the content of the notification. This property can be empty. | Date | DateTime | Date to be displayed in the notification. This property can be empty. | New in SaaSExpireOnReboot | Boolean | - True: Discards the notification when the computer is rebooted.
- False (Default): Preserves the notification when the computer is rebooted.
| HeaderImagePath | Character string | Absolute path of an image on disk that can be used as a header for the notification. The size of the displayed image is 364 x 180 pixels (the image is automatically reduced if necessary). | ID | Character string | Unique identifier associated with the notification. Two notifications from the same application cannot have the same identifier. If two notifications have the same identifier, the new notification will replace the previous one. This property can be empty. | Inputs | Array of sysNotificationInput | "User input" controls of the notification. These can be either "text input" or "combo box" controls. The controls appear from top to bottom in the order they were added to the array. Note: There can be no more than 4 input controls in a notification. Additional controls will replace the previous ones. | LogoImageCrop | Integer constant | Cropping to be applied to the logo: - sysNotifNoCrop (default value): Aucun contour, image carrée.
- sysNotifCircleCrop: Circle-cropped image.
| LogoImagePath | Character string | Absolute path of an image on disk that can be used as a logo for the notification. The size of the displayed image is 48 x 48 pixels in the notification (the image is automatically reduced if necessary). You can crop the logo using the LogoImageCrop property. This property can be empty. | Note | Character string | String that will be returned to the application when the user clicks the notification (not a button). Can be used to identify the notification clicked, for example. This property can be empty. | New in SaaSProgressBars | Array of sysNotificationProgressBar | Progress bars displayed in the notification. Progress bars are placed above the Buttons controls (if any) in the notification. The controls appear from top to bottom in the order they were added to the array. Note: There can be no more than 6 progress bars in a notification. New progress bars will replace the old ones. | Scenario | Integer constant | Specific behavior of the notification: - sysNotifAlarm: The notification stays on screen until the user interacts with it. A "reminder" sound alert defined by the system is played in a loop.
- sysNotifCall: The notification stays on screen until the user interacts with it. An incoming call sound defined by the system is played in a loop, and a different style is used for the buttons.
- sysNotifStandard (default): The notification appears on screen for a few seconds before moving to the Windows Action Center.
- sysNotifReminder: The notification stays on screen until the user interacts with it. A "reminder" sound alert defined by the system is played when the notification appears.
| Text1 | Character string | Optional text displayed below the title. The combined text of the Text1 and Text2 properties cannot occupy more than 4 lines. | Text2 | Character string | Optional text displayed below text 1. If the Text1 property is empty, the Text2 property will be displayed instead. The combined text of the Text1 and Text2 properties cannot occupy more than 4 lines. | Title | Character string | Notification title displayed on 2 lines maximum. | XML | Character string | XML code that corresponds to the current configuration of the notification. In write mode, this property allows you to specify an XML description of the notification. If this property is specified, all the other properties of the sysNotification type will be ignored. In read mode, this property gets the XML code generated by WINDEV corresponding to the notification. |
Related Examples:
|
Training (WINDEV): WD Windows Notification Management
[ + ] Starting with Windows 10, "toast" notifications (on the right side of the Desktop) are interactive, and enable you to include buttons, input areas and combo boxes. This example shows how to use this type of notifications.
|
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|