Vcl.ComCtrls.TToolBar.CustomDrawButton

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function CustomDrawButton(Button: TToolButton; State: TCustomDrawState;  Stage: TCustomDrawStage; var Flags: TTBCustomDrawFlags): Boolean; virtual;

C++

virtual bool __fastcall CustomDrawButton(TToolButton* Button, TCustomDrawState State, TCustomDrawStage Stage, TTBCustomDrawFlags &Flags);

Properties

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

Description

Generates OnCustomDrawButton and OnAdvancedCustomDrawButton events.

CustomDrawButton is called automatically at discrete stages during the drawing process to generate the OnCustomDrawButton and OnAdvancedCustomDrawButton events.

Button specifies the tool button that needs to be drawn.

State describes the state of the button, so that the event handler can reflect that state in the button's image.

Stage indicates the current stage of the paint process. When Stage is cdPrePaint, CustomDrawButton generates an OnCustomDrawButton event followed by an OnAdvancedCustomDrawButton event. At all other stages, CustomDrawButton generates only the OnAdvancedCustomDrawButton event.

Flags is used only when Stage is cdPrePaint. It influences how the button is subsequently rendered by the default drawing process. CustomDrawButton returns the set of flags that indicates how the toolbar should proceed with rendering the button.

See Also