Class TColorBut (unit ColorBut)

Inherits from

TCustomControl

Constructors


constructor Create(AOwner: TComponent);

Public procedures in the base class to override

Now, class member functions/procedures are defined



Functions

destructor Destroy;

Allow tab to bring focus

procedure Loaded;

obligation

procedure Paint;

button state is disabled - grayed

procedure DoEnter;

Private procedures in the base class to override

end; who does this belong to?


procedure DoExit;

tell paint to draw focus rectangle

procedure KeyAccel(var Message: TCMDialogChar);

allow CR to activate button

procedure KeyDown(var Key: Word; Shift: TShiftState);

tell paint not to draw focus rectangle

procedure KeyUp(var Key: Word; Shift: TShiftState);

button state is down, paint as recessed

procedure MouseDown(Button:TMouseButton; Shift:TShiftState; X,Y: Integer);

a hot key (accelerator key) activated us

procedure MouseUp(Button:TMouseButton; Shift:TShiftState; X, Y: Integer);

button state is down - paint as recessed

procedure SetAlignment(Value: TAlignment);

Private procedures used indirectly to set property values

button state is up - normal


procedure SetBevelSize(Value: Integer);


procedure SetBevelStyle(Value: TButtonBevel);


procedure SetCaption(var Message: TMessage);

Procedures to respond to designated Windows messages

procedure SetColor(Value: TColor);


procedure SetEnabled(var Message: TMessage);


procedure SetFocusOff(var Message: TMessage);

button is disabled now

procedure SetFocusOn(var Message: TMessage);

paint without the focus rectangle

procedure SetFont(var Message: TMessage);

paint with a focus rectangle

procedure SetPicture(Value: TPicture);


procedure SetSpacing(Value: Integer);

We're probably comparing 2 pointers!

procedure SetStyle(Value: TButtonStyle);


Properties

property Alignment : TAlignment

Properties

property BevelSize : Integer


property BevelStyle : TButtonBevel


property Caption :


property Color : TColor


property Cursor :


property DragCursor :


property DragMode :


property Enabled :


property Font :


property Height :


property Left :


property Name :


property Picture : TPicture


property Spacing : Integer


property Style : TButtonStyle


property TabOrder :


property TabStop :


property Tag :


property Top :


property Width :


Events

event OnClick :

events

event OnDblClick :


event OnDragDrop :


event OnDragOver :


event OnEndDrag :


event OnEnter :


event OnExit :


event OnKeyDown :


event OnKeyPress :


event OnKeyUp :


event OnMouseDown :


event OnMouseMove :


event OnMouseUp :


Variables

FAlignment : TAlignment;

Property values are stored here

FBevelSize : Integer;


FBevelStyle : TButtonBevel;


FColor : TColor;


FFocused : Boolean;


FPicture : TPicture;


FSpacing : Integer;


FState : TButtonState;


FStyle : TButtonStyle;



Constructors


constructor Create(AOwner: TComponent);

Public procedures in the base class to override

Now, class member functions/procedures are defined


Functions


destructor Destroy;

Allow tab to bring focus


procedure Loaded;

obligation


procedure Paint;

button state is disabled - grayed


procedure DoEnter;

Private procedures in the base class to override

end; who does this belong to?


procedure DoExit;

tell paint to draw focus rectangle


procedure KeyAccel(var Message: TCMDialogChar);

allow CR to activate button


procedure KeyDown(var Key: Word; Shift: TShiftState);

tell paint not to draw focus rectangle


procedure KeyUp(var Key: Word; Shift: TShiftState);

button state is down, paint as recessed


procedure MouseDown(Button:TMouseButton; Shift:TShiftState; X,Y: Integer);

a hot key (accelerator key) activated us


procedure MouseUp(Button:TMouseButton; Shift:TShiftState; X, Y: Integer);

button state is down - paint as recessed


procedure SetAlignment(Value: TAlignment);

Private procedures used indirectly to set property values

button state is up - normal


procedure SetBevelSize(Value: Integer);


procedure SetBevelStyle(Value: TButtonBevel);


procedure SetCaption(var Message: TMessage);

Procedures to respond to designated Windows messages


procedure SetColor(Value: TColor);


procedure SetEnabled(var Message: TMessage);


procedure SetFocusOff(var Message: TMessage);

button is disabled now


procedure SetFocusOn(var Message: TMessage);

paint without the focus rectangle


procedure SetFont(var Message: TMessage);

paint with a focus rectangle


procedure SetPicture(Value: TPicture);


procedure SetSpacing(Value: Integer);

We're probably comparing 2 pointers!


procedure SetStyle(Value: TButtonStyle);


Properties


property Alignment : TAlignment

Properties


property BevelSize : Integer


property BevelStyle : TButtonBevel


property Caption :


property Color : TColor


property Cursor :


property DragCursor :


property DragMode :


property Enabled :


property Font :


property Height :


property Left :


property Name :


property Picture : TPicture


property Spacing : Integer


property Style : TButtonStyle


property TabOrder :


property TabStop :


property Tag :


property Top :


property Width :


Events


event OnClick :

events


event OnDblClick :


event OnDragDrop :


event OnDragOver :


event OnEndDrag :


event OnEnter :


event OnExit :


event OnKeyDown :


event OnKeyPress :


event OnKeyUp :


event OnMouseDown :


event OnMouseMove :


event OnMouseUp :


Variables


FAlignment : TAlignment;

Property values are stored here


FBevelSize : Integer;


FBevelStyle : TButtonBevel;


FColor : TColor;


FFocused : Boolean;


FPicture : TPicture;


FSpacing : Integer;


FState : TButtonState;


FStyle : TButtonStyle;