Vcl.ComCtrls.TToolBar.OnCustomDraw
Delphi
property OnCustomDraw: TTBCustomDrawEvent read FOnCustomDraw write FOnCustomDraw;
C++
__property TTBCustomDrawEvent OnCustomDraw = {read=FOnCustomDraw, write=FOnCustomDraw};
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
event | published | Vcl.ComCtrls.pas Vcl.ComCtrls.hpp |
Vcl.ComCtrls | TToolBar |
Description
Occurs when the toolbar must be painted.
Write an OnCustomDraw event handler to enhance or replace the automatic painting of the toolbar. Use the toolbar's Canvas property to render the toolbar's image. OnCustomDraw is for painting the background of the toolbar. The painting of individual buttons on the toolbar should be handled in an OnCustomDrawButton or OnAdvancedCustomDrawButton event handler.
Note: OnCustomDraw only occurs prior to painting the toolbar's background. To respond at other points in the paint process (when the background is erased, or after the default painting of the toolbar's background), use OnAdvancedCustomDraw instead.
OnCustomDraw is an event handler of type Vcl.ComCtrls.TTBCustomDrawEvent.