Class TPopButton (unit PopButton)

Inherits from

TPanel

Constructors


constructor Create(AOwner: TComponent);



Functions

destructor Destroy;

* Go through Init just one time

procedure ControlClick (Sender: TObject);

* Redirect the MouseDown event

procedure ControlMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);

* Redirect the MouseUp event

procedure ControlMouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);

* Anything to throw out??

procedure GotFocus;

* Register this component.

procedure LostFocus;

* Init the PopButton during the first focus

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

* If the focus is lost, then the bevels should not be raised!

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


procedure CMMouseEnter(var Message: TMessage);


procedure CMMouseLeave(var Message: TMessage);


procedure Init;

* Save the FontColor, so it can be changed to its original color after a lostfocus event

Properties

property FocusColor : TColor


property PressedColor : TColor


Events

event OnGotFocus : TGotFocusEvent


event OnLostFocus : TLostFocusEvent


Variables

FFocusColor : TColor;


FInit : Boolean;


FOnGotFocus : TGotFocusEvent;


FOnLostFocus : TLostFocusEvent;


FPressedColor : TColor;


SavedFontColor : TColor;



Constructors


constructor Create(AOwner: TComponent);


Functions


destructor Destroy;

* Go through Init just one time


procedure ControlClick (Sender: TObject);

* Redirect the MouseDown event


procedure ControlMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);

* Redirect the MouseUp event


procedure ControlMouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);

* Anything to throw out??


procedure GotFocus;

* Register this component. Add it to Samples


procedure LostFocus;

* Init the PopButton during the first focus


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

* If the focus is lost, then the bevels should not be raised!


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


procedure CMMouseEnter(var Message: TMessage);


procedure CMMouseLeave(var Message: TMessage);


procedure Init;

* Save the FontColor, so it can be changed to its original color after a lostfocus event


Properties


property FocusColor : TColor


property PressedColor : TColor


Events


event OnGotFocus : TGotFocusEvent


event OnLostFocus : TLostFocusEvent


Variables


FFocusColor : TColor;


FInit : Boolean;


FOnGotFocus : TGotFocusEvent;


FOnLostFocus : TLostFocusEvent;


FPressedColor : TColor;


SavedFontColor : TColor;