PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN
  • Notification example
  • Properties specific to the description of sysNotification variables
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
sysNotification (Type of variable)
In french: sysNotification
The sysNotification type is used to define all the advanced characteristics of an interactive system notification. The characteristics of this notification can be defined and changed using different WLanguage properties.
Remark: For more details on the declaration of this type of variable and the use of WLanguage properties, see Declaring a variable.
Example
// 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: 2 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, ... (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).
Remark: 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 the description of sysNotification variables

The following properties can be used to handle a system notification:
Property nameType usedEffect
ActionGlobal procedure onlyName 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.
AttributionCharacter stringText 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.
ButtonsArray of sysNotificationButtonButton 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).
Caution: There can be no more than 5 buttons in a notification.
ContentImagePathCharacter stringAbsolute path of an image on disk that can be added to the content of the notification.
This property can be empty.
DateDateTimeDate to be displayed in the notification.
This property can be empty.
HeaderImagePathCharacter stringAbsolute 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).
IDCharacter stringUnique 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.
InputsArray 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.
Caution : There can be no more than 4 input controls in a notification. Additional controls will replace the previous ones.
LogoImageCropInteger constantCropping to be applied to the logo:
  • sysNotifNoCrop (default value): No cropping, square image.
  • sysNotifCircleCrop: Circle-cropped image.
LogoImagePathCharacter stringAbsolute 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.
NoteCharacter stringString 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.
ScenarioInteger constantSpecific 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 value): The notification appears on screen for a few seconds before going into 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.
Text1Character stringOptional text displayed below the title. The combined text of the Text1 and Text2 properties cannot occupy more than 4 lines.
Text2Character stringOptional 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.
TitleCharacter stringNotification title displayed on 2 lines maximum.
XMLCharacter stringXML 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 is used to get the XML code generated by WINDEV corresponding to the notification.
Related Examples:
WD Windows Notification Management 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.
Minimum version required
  • Version 27
This page is also available for…
Comments
Click [Add] to post a comment