Class TCommonCommand (unit Commncmd)

Inherits from

TCommonPropertyGroup

Constructors


constructor Create(AOwner: TComponent);

--------------------------------------------------------------------- end class TCommonPropertyGroup ---------------------------------------------------------------------} {--------------------------------------------------------------------- class TCommonCommand ---------------------------------------------------------------------


Functions

function CanAdd(AComponent: TComponent): Boolean;

function CanAdd returns True iff the given component is a TSpeedButton, TButton, or TMenuItem, along with all of the conditions of TCommonPropertyGroup

set and sync all grouped components


procedure Synchronize(AComponent: TComponent);

procedure Syncronize sets the Enabled, Checked and OnClick properties of the given component.

procedure SetChecked(NewValue: Boolean);

set and sync all grouped components

procedure SetEnabled(NewValue: Boolean);

set defaults

procedure SetOnClick(NewValue: TNotifyEvent);

set and sync all grouped components

Properties

property Checked : Boolean

property Checked controls the Checked state of all contained TMenuItems, and the Down state of all contained TSpeedButtons.

property Enabled : Boolean

property Enabled controls the Enabled state of all contained components

Events

event OnClick : TNotifyEvent

property OnClick Points to the event handler for the OnClick event of all contained components

Variables

FChecked : Boolean;


FEnabled : Boolean;


FOnClick : TNotifyEvent;



Constructors


constructor Create(AOwner: TComponent);

--------------------------------------------------------------------- end class TCommonPropertyGroup ---------------------------------------------------------------------} {--------------------------------------------------------------------- class TCommonCommand ---------------------------------------------------------------------


Functions


function CanAdd(AComponent: TComponent): Boolean;

function CanAdd returns True iff the given component is a TSpeedButton, TButton, or TMenuItem, along with all of the conditions of TCommonPropertyGroup

set and sync all grouped components


procedure Synchronize(AComponent: TComponent);

procedure Syncronize sets the Enabled, Checked and OnClick properties of the given component.

can only add if all previous conditions are met and component is one of TMenuItem, TSpeedButton, or TButton derivitive


procedure SetChecked(NewValue: Boolean);

set and sync all grouped components


procedure SetEnabled(NewValue: Boolean);

set defaults


procedure SetOnClick(NewValue: TNotifyEvent);

set and sync all grouped components


Properties


property Checked : Boolean

property Checked controls the Checked state of all contained TMenuItems, and the Down state of all contained TSpeedButtons. if (Checked) then Down; Is ignored for all contained TButtons.


property Enabled : Boolean

property Enabled controls the Enabled state of all contained components


Events


event OnClick : TNotifyEvent

property OnClick Points to the event handler for the OnClick event of all contained components


Variables


FChecked : Boolean;


FEnabled : Boolean;


FOnClick : TNotifyEvent;