Class TBorBtn (unit Bwccdel) |
Inherits from
TButtonControl
constructor Create(AOwner: TComponent);
- Get Version number, ignore Locale
procedure Click;
destructor Destroy;
** New Destructor to free up bitmap resources.
procedure CreateParams(var Params: TCreateParams);
Always send focus change message
procedure CreateWnd;
** This will be called whenever the object needs to be created with a Windows
** handle - even when RecreateWnd is called.
procedure SetButtonStyle(ADefault: Boolean);
procedure CMDialogChar(var Message: TCMDialogChar);
procedure CMDialogKey(var Message: TCMDialogKey);
procedure CMFocusChanged(var Message: TCMFocusChanged);
procedure CNCommand(var Message: TWMCommand);
Set BMPs for new button type
function CustomBMPsEmpty: boolean;
** Simple check to see if all Custom Bitmaps are loaded.
procedure DefineProperties(Filer: TFiler);
** This declaration allows our Persistent 'Hidden' object to become persistent.
procedure DeleteBMPS;
** Delete the three bitmaps used by the Picture buttons, if the HBitmap handles
** are non-zero.
function GetCaption: string;
** If button type not WordOnly, return caption for hard-wired list.
function GetKind:TBWCCButtonKind;
'Hidden' persistent Caption for custom btns
procedure ReadCustCaption(Reader: TReader);
** Reader method for our Persistent 'Hidden' caption property.
procedure SetBitmaps(Index: integer; Value: TBitmap);
** Sets one of the array of bitmaps to the passed value.
procedure SetCaption(Value: string);
** Only set caption if button type is WordOnly type.
procedure SetDefault(Value: Boolean);
procedure SetKind(Value:TBWCCButtonKind);
** Re-written SetKind routine.
procedure WriteCustCaption(Writer: TWriter);
** Writer method for our Persistent 'Hidden' caption property.
property BMPFocus : TBitmap
property BMPNormal : TBitmap
property BMPPressed : TBitmap
property Cancel : Boolean
property Caption : string
property Default : Boolean
property DragCursor :
property DragMode :
property Enabled :
property Font :
property Kind : TBWCCButtonKind
property ModalResult : TModalResult
property ParentFont :
property ParentShowHint :
property PopupMenu :
property ShowHint :
property TabOrder :
property TabStop :
property Visible :
event OnClick :
event OnDBlClick :
event OnDragDrop :
event OnDragOver :
event OnEndDrag :
event OnEnter :
event OnExit :
event OnKeyDown :
event OnKeyPress :
event OnKeyUp :
event OnMouseDown :
event OnMouseMove :
event OnMouseUp :
CurrentBWCCKind : TBWCCButtonKind;
CurrentKind : TDefStyle;
CurrentState : TSTATE;
FActive : Boolean;
FBitmaps : array[0..2] of HBitmap;
FCancel : Boolean;
FCustomBMPs : array[0..2] of TBitmap;
Bitmaps to use for non WordOnly/Custom btns
FCustomCaption : string;
Array of HBitmaps for custom buttons
FCustomHandles : array[0..2] of HBitmap;
Stored Bitmaps for Custom buttons
FDefault : Boolean;
FModalResult : TModalResult;
FReserved : Byte;
constructor Create(AOwner: TComponent);
Get Version number, ignore Locale
procedure Click;
destructor Destroy;
** New Destructor to free up bitmap resources.
procedure CreateParams(var Params: TCreateParams);
Always send focus change message
procedure CreateWnd;
** This will be called whenever the object needs to be created with a Windows
** handle - even when RecreateWnd is called.
procedure SetButtonStyle(ADefault: Boolean);
procedure CMDialogChar(var Message: TCMDialogChar);
procedure CMDialogKey(var Message: TCMDialogKey);
procedure CMFocusChanged(var Message: TCMFocusChanged);
procedure CNCommand(var Message: TWMCommand);
Set BMPs for new button type
function CustomBMPsEmpty: boolean;
** Simple check to see if all Custom Bitmaps are loaded.
procedure DefineProperties(Filer: TFiler);
** This declaration allows our Persistent 'Hidden' object to become persistent.
** Defines what methods are used to read/write, and whether or not to save the
** data in the DFM unit.
procedure DeleteBMPS;
** Delete the three bitmaps used by the Picture buttons, if the HBitmap handles
** are non-zero.
function GetCaption: string;
** If button type not WordOnly, return caption for hard-wired list.
** If button Custom, return our hidden persistent caption.
** Otherwise return genuine caption.
function GetKind:TBWCCButtonKind;
'Hidden' persistent Caption for custom btns
procedure ReadCustCaption(Reader: TReader);
** Reader method for our Persistent 'Hidden' caption property. Called whilst
** loading in data from the DFM unit, if a 'CustomCaption' property identified.
procedure SetBitmaps(Index: integer; Value: TBitmap);
** Sets one of the array of bitmaps to the passed value. If type is set to
** Custom, force a redisplay with the new BMPs.
procedure SetCaption(Value: string);
** Only set caption if button type is WordOnly type.
procedure SetDefault(Value: Boolean);
procedure SetKind(Value:TBWCCButtonKind);
** Re-written SetKind routine. The 3 bitmaps needed for a BorBtn are now
** stored in the object instance, and freed when the button type changes,
** or the button is destroyed.
** Streamlined code to use loop, and base ID offsets from BWCC.DLL.
procedure WriteCustCaption(Writer: TWriter);
** Writer method for our Persistent 'Hidden' caption property. Called whilst
** saving data to the DFM unit, if a 'CustomCaption' property is not empty.
property BMPFocus : TBitmap
property BMPNormal : TBitmap
property BMPPressed : TBitmap
property Cancel : Boolean
property Caption : string
property Default : Boolean
property DragCursor :
property DragMode :
property Enabled :
property Font :
property Kind : TBWCCButtonKind
property ModalResult : TModalResult
property ParentFont :
property ParentShowHint :
property PopupMenu :
property ShowHint :
property TabOrder :
property TabStop :
property Visible :
event OnClick :
event OnDBlClick :
event OnDragDrop :
event OnDragOver :
event OnEndDrag :
event OnEnter :
event OnExit :
event OnKeyDown :
event OnKeyPress :
event OnKeyUp :
event OnMouseDown :
event OnMouseMove :
event OnMouseUp :
CurrentBWCCKind : TBWCCButtonKind;
CurrentKind : TDefStyle;
CurrentState : TSTATE;
FActive : Boolean;
FBitmaps : array[0..2] of HBitmap;
FCancel : Boolean;
FCustomBMPs : array[0..2] of TBitmap;
Bitmaps to use for non WordOnly/Custom btns
FCustomCaption : string;
Array of HBitmaps for custom buttons
FCustomHandles : array[0..2] of HBitmap;
Stored Bitmaps for Custom buttons
FDefault : Boolean;
FModalResult : TModalResult;
FReserved : Byte;