Class TPopButton (unit PopButton) |
Inherits from
TPanel
constructor Create(AOwner: TComponent);
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
property FocusColor : TColor
property PressedColor : TColor
event OnGotFocus : TGotFocusEvent
event OnLostFocus : TLostFocusEvent
FFocusColor : TColor;
FInit : Boolean;
FOnGotFocus : TGotFocusEvent;
FOnLostFocus : TLostFocusEvent;
FPressedColor : TColor;
SavedFontColor : TColor;
constructor Create(AOwner: TComponent);
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
property FocusColor : TColor
property PressedColor : TColor
event OnGotFocus : TGotFocusEvent
event OnLostFocus : TLostFocusEvent
FFocusColor : TColor;
FInit : Boolean;
FOnGotFocus : TGotFocusEvent;
FOnLostFocus : TLostFocusEvent;
FPressedColor : TColor;
SavedFontColor : TColor;