Vcl.ComCtrls.TToolBar.OnCustomDrawButton

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

property OnCustomDrawButton: TTBCustomDrawBtnEvent read FOnCustomDrawButton

C++

__property TTBCustomDrawBtnEvent OnCustomDrawButton = {read=FOnCustomDrawButton, write=FOnCustomDrawButton};

Properties

Type Visibility Source Unit Parent
event published
Vcl.ComCtrls.pas
Vcl.ComCtrls.hpp
Vcl.ComCtrls TToolBar

Description

Occurs when one of the buttons in the toolbar must be painted.

Write an OnCustomDrawButton event handler to enhance or replace the automatic painting of the toolbar's buttons. Use the toolbar's Canvas property to render the button's image. OnCustomDrawButton is for painting individual buttons on the toolbar. The painting of the toolbar itself should be handled in an OnCustomDraw or OnAdvancedCustomDraw event handler.

Note: OnCustomDrawButton only occurs prior to painting the button. To respond at other points in the process of painting a button (when the background is erased, or after the default painting of the button), use OnAdvancedCustomDrawButton instead.

OnCustomDrawButton is an event handler of type Vcl.ComCtrls.TTBCustomDrawBtnEvent.

See Also