Class TNvOS8PushButton (unit NvOS8PushButton)

Inherits from

TButton

Envy Technologies Apple Macintosh OS 8 Platium Controls for Delphi 32 TNvOS8PushButton - Push Button control v0.2 Amendment Log ============= 10/Feb/1997 DamienG New: Colors shade-offsets from base of $00777777 New: Property base-color to allow colored buttons New: Sits better on different colored backgrounds Fix: Memory leak in destructor Fix: Cosmetic changes to avoid warning messages 09/Feb/1997 DamienG New: Changed pixels to be rect-offsetable for default rect New: Added 'Default' property rectangle ala MacOS8 Notes ===== 1. Default and not enabled buttons focus rectangle is transparent. Is this correct? Or should it be shaded as a disabled button face? 2. Changing default does not cause the control to be repainted. Anybody know how to capture this message into a procedure?

Constructors


constructor Create(AOwner: TComponent);



Functions

destructor Destroy;


procedure CreateHandle;


procedure CreateParams(var Params: TCreateParams);


procedure SetButtonStyle(ADefault: Boolean);

Essential routine to allow ownerdraw TButton

procedure CMEnabledChanged(var Message: TMessage);


procedure CMFontChanged(var Message: TMessage);


procedure CNDrawItem(var Message: TWMDrawItem);


procedure DrawItem(const DrawItemStruct: TDrawItemStruct);


procedure SetBaseColor(Value: TColor);

If base-color changes, reload shades table and redraw

Properties

property BaseColor : TColor


property Cancel :


property Caption :


property Enabled :


property Font :


property ParentShowHint :


property ShowHint :


property TabOrder :


property TabStop :


property Visible :


Events

event OnEnter :


event OnExit :


Variables

FBaseColor : TColor;


FCanvas : TCanvas;


IsFocused : Boolean;


Shade : TShade;



Constructors


constructor Create(AOwner: TComponent);


Functions


destructor Destroy;


procedure CreateHandle;


procedure CreateParams(var Params: TCreateParams);


procedure SetButtonStyle(ADefault: Boolean);

Essential routine to allow ownerdraw TButton


procedure CMEnabledChanged(var Message: TMessage);


procedure CMFontChanged(var Message: TMessage);


procedure CNDrawItem(var Message: TWMDrawItem);


procedure DrawItem(const DrawItemStruct: TDrawItemStruct);


procedure SetBaseColor(Value: TColor);

If base-color changes, reload shades table and redraw


Properties


property BaseColor : TColor


property Cancel :


property Caption :


property Enabled :


property Font :


property ParentShowHint :


property ShowHint :


property TabOrder :


property TabStop :


property Visible :


Events


event OnEnter :


event OnExit :


Variables


FBaseColor : TColor;


FCanvas : TCanvas;


IsFocused : Boolean;


Shade : TShade;