Class TCommonPropertyGroup (unit Commncmd) |
TComponent
CommnCmd.pas (c) 1996 Dwayne Mercredi declares classes TCommonPropertyGroup, TCommonCommand class TCommonPropertyGroup: base class for any group of components on a single form that share a number of properties or events; you can simply place the shared properties in a descendant class of TCommonPropertyGroup, override a few methods, and setting the properties in the common property group will set the properties of all contained components class TCommonCommand: implements a common command with Enabled, Checked, and OnClick. Allows only TButton, TSpeedButton, and TMenuItem components to be added to the group. Enabled controls the enable state of all contained components OnClick points to the event handler for OnClick for all contained components Checked is reflected in the Checked state of TMenuItems and the Down state of TSpeedButtons. It is ignored for TButtons.
Constructors |
Functions |
synchronize
add and synchronize
no synchronization to do
read the components name and add to internal list
Properties |
Events |
Variables |
Constructors |
--------------------------------------------------------------------- class TCommonPropertyGroup ---------------------------------------------------------------------
Functions |
procedure Add adds component to list if CanAdd returns true for the given component
synchronize
procedure Assign allows assignment of PropertyGroups to one another
function CanAdd returns whether or not the given component can be added to the list. Should return True for only appropriate components. Returns true if not already in list
default action
procedure Clear clears all components from the list
add and synchronize
function Contains returns true iff the given component is in the list
procedure Remove removes the given component from the list if it is in the list
procedure SynchronizeAll calls Synchronize with all components in list
no synchronization to do
procedure DefineProperties sets up ReadGroup and WriteGroup to read and write the list of components to the given filer
procedure Loaded sets up the list of components given the names. Searches the Owner's list of components for the names
write the components name
procedure Notification Removes component from list if the notification is of Removal
procedure ReadGroup reads the list of component names from the given Reader
procedure Syncronize used to syncronize the given component with the state of the common property group. Called for each component when it is added to the list and whenever SyncronizeAll is called
only can add if it isn't already in list
procedure WriteGroup writes the list of component names to the given writer
read the components name and add to internal list
Properties |
property Count returns the number of components in list
property Group zero based array of components within this common property group range of Index: 0 .. Count - 1
Events |
Variables |