Skip to main content

TdxAlertWindowManager.OnCustomDrawButton Event

Enables you to custom paint an alert window‘s buttons, including caption buttons, navigation panel buttons, and custom buttons.

Declaration

property OnCustomDrawButton: TdxAlertWindowManagerCustomDrawButtonEvent read; write;

Remarks

Sender specifies the alert window manager that raised the event.

AAlertWindow specifies the alert window being custom painted.

ACanvas specifies the drawing surface.

AViewInfo provides ViewInfo information (a TdxAlertWindowCustomButtonViewInfo class instance) used to paint the alert window button. You can identify the button being custom painted via a TdxAlertWindowButtonKind value returned by the AViewInfo.Kind property. Based on the returned property value, you can cast AViewInfo to the corresponding ViewInfo class (a TdxAlertWindowCustomButtonViewInfo descendant) as suggested in the table below, to access button-specific properties.

Value ViewInfo Class
awbkClose TdxAlertWindowCloseButtonViewInfo
awbkPin TdxAlertWindowPinButtonViewInfo
awbkDropdown TdxAlertWindowDropdownButtonViewInfo
awbkPrevious TdxAlertWindowPreviousButtonViewInfo
awbkNext TdxAlertWindowNextButtonViewInfo
awbkCustom TdxAlertWindowButtonViewInfo

ADone specifies whether default painting is required. Set ADone to True, to prevent default code execution.

See Also