Alert Windows
- 3 minutes to read
Alert windows provide on-screen notifications of events to end-users. These windows are always displayed on top of all other windows, so they are easily noted. To get acquainted with the alert window manager and alert window capabilities, see the AlertWindowDemo shipped with the ExpressEditors Library.
End-users can perform the following operations with alert windows:
Move alert windows anywhere on screen and stick them to screen edges.
Pin alert windows to the screen or close them.
Perform context actions using the menu and custom buttons.
Browse related notifications (messages) within an alert window.
These operations can be performed via the following alert window elements:
Message
A message conveys the essential information of a notification. Message elements include:
Caption;
Text;
Image.
You can specify message elements either via the alert window manager’s Show method parameters or using an alert window’s OptionsMessage property set.
With alert windows, you can queue related messages into a list and allow end-users to browse this list using the Navigation Panel (see the corresponding section below).
Caption Buttons
Alert windows contain three caption buttons: Dropdown, Pin, and Close. These buttons allow end-users to control alert window visibility and perform additional context-driven actions via a dropdown menu.
The Dropdown button can be used for the popup menu call. This button is inactive unless you associated a menu (a TdxBarPopupMenu, TdxRibbonPopupMenu, or TPopupMenu control) with it via an alert window’s PopupMenu property.
Clicking the Pin button “pins” an alert window to the screen. A pinned window does not disappear until an end-user closes it. Clicking the Pin button again unpins the window. Unpinned windows automatically disappear after a delay.
Clicking the Close button closes an alert window (even if it is pinned).
You can change the visibility of the caption buttons via alert window options and respond to button clicks by handling the alert window manager’s OnCaptionButtonClick event.
Custom Buttons
With custom buttons, you can provide additional functionality to your alert windows. To add these buttons, use the OptionsButtons property and handle the alert window manager’s OnButtonClick event to respond to button clicks.
Navigation Panel
This panel allows end-users to easily browse a message list (or queue) associated with an alert window. Use the OptionsNavigationPanel property to customize navigation panel settings as required.
You can provide common settings for alert windows via the alert window manager and adjust settings for any alert window individually.
An alert window is implemented by the TdxAlertWindow class. The table below lists class members that affect main alert window characteristics.
Characteristic | Description |
---|---|
Visibility | The Show and Hide methods. The CurrentMessageIndex and Visible properties. |
Content | The OptionsCaptionButtons, OptionsButtons, MessageList, OptionsMessage, and OptionsNavigationPanel properties. |
Position | The Left and Top properties. |
Appearance | The LookAndFeel property. |
Behavior | The OptionsBehavior and Pinned properties. |
Animation | The OptionsAnimate property. |
Size | The OptionsSize property. |
HitTest Information | The HitTest property. |