Vcl.ComCtrls.TToolBar.IsCustomDrawn

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function IsCustomDrawn(Target: TCustomDrawTarget; Stage: TCustomDrawStage): Boolean; virtual;

C++

virtual bool __fastcall IsCustomDrawn(TCustomDrawTarget Target, TCustomDrawStage Stage);

Properties

Type Visibility Source Unit Parent
function protected
Vcl.ComCtrls.pas
Vcl.ComCtrls.hpp
Vcl.ComCtrls TToolBar

Description

Indicates whether an event handler exists to respond at a particular stage in the paint process.

TToolBar uses IsCustomDrawn internally to determine whether it needs generate the various custom draw events.

Target indicates what object is currently being painted. If Target is dtControl, it is the background of the toolbar, and IsCustomDrawn checks whether there is an OnCustomDraw or OnAdvancedCustomDraw event handler. If Target is dtItem, it is one of the tool buttons, and IsCustomDrawn checks for an OnCustomDrawButton or OnAdvancedCustomDrawButton event handler. TToolBar does not use dtSubItem as a target.

Stage indicates the current stage of the paint process. If stage is not cdPrePaint, then the tool bar only generates an event if it has one of the advanced custom draw event handlers.

IsCustomDrawn returns true if the toolbar should generate an event (there is an event handler to respond.) IsCustomDrawn returns false if there is no need to generate a custom draw event.

See Also