CustomActionList

Qualified name: delphifmx.CustomActionList

class CustomActionList

Bases: ContainedActionList

The base class for list of actions, without the published properties. FMX.ActnList.TCustomActionList inherits from System.Actions.TContainedActionList. All content below this line refers to System.Actions.TContainedActionList. The base class for list of actions, without the published properties. Implement TContainedActionList to work with common properties for all GUI application frameworks. Actions lists the actions maintained by the action list. The ActionCount property returns the number of actions in the list. OnStateChange sends a notification when the State changes.

Methods

BindMethodsToEvents

Connects methods to component events if they are named using the following pattern: Prefix_ComponentName_EventName.

DialogKey

Evaluates an input key combination to determine whether it is a shortcut for one of the actions in the list.

GetParentComponent

Returns the parent of a component.

HasParent

Indicates whether the component has a parent to handle its filing.

Attributes

ActionCount

Indicates the number of actions in the action list.

Actions

Lists the actions maintained by the action list.

ClassName

Returns the TObject.ClassName

ComObject

Specifies the interface reference implemented by the component.

ComponentCount

Returns the owned component count

ComponentIndex

Indicates the position of the component in its owner's Components property array.

ComponentState

Describes the current state of the component, indicating when a component needs to avoid certain actions.

ComponentStyle

Governs the behavior of the component.

Components

Returns an iterator over the owned components

DesignInfo

Contains information used by the Form designer.

Images

Defines the reference to a TCustomImageList list of images to be used to draw images on the component.

Name

Specifies the name of the component as referenced in code.

Observers

Indicates the TObservers object added to the TComponent.

Owner

Returns the Component Owner

State

Indicates whether the actions in the action list respond when the user triggers a client object.

Tag

Stores a NativeInt integral value as a part of a component.

VCLComObject

Represents information used internally by components that support COM.

ActionCount

Indicates the number of actions in the action list.

Actions

Lists the actions maintained by the action list.

BindMethodsToEvents(prefix)

Connects methods to component events if they are named using the following pattern: Prefix_ComponentName_EventName. Example: def handle_button1_OnClick(Sender): pass The function returns a list of tuples. Each tuple contains the name of the component, the name of the event and the method object assigned to the event. Note that the prefix parameter is optional and will default to “handle_”.

ComponentCount

Returns the owned component count

Components

Returns an iterator over the owned components

DialogKey(Key: int, Shift: ShiftState) bool

Evaluates an input key combination to determine whether it is a shortcut for one of the actions in the list. Typically, your applications do not need to call DialogKey explicitly. When the form’s KeyDown method does not evaluate a shortcut key by some other means (such as an event handler), it calls DialogKey for every associated action list until it finds an action that can handle the shortcut. The action list’s DialogKey method, in turn, checks the specified keystroke against the ShortCut property and SecondaryShortCuts properties of each action in the list. If it finds a match, it tells the action to handle the shortcut, and then returns True. If DialogKey cannot find an action to handle the shortcut, it returns False. DialogKey has the following parameters:

Parameter

Description

Key

Is the key code for the potential shortcut key.

Shift

Specifies the state of the Shift, Alt, and Ctrl keys that may be combined with Key.

GetParentComponent()

Returns the parent of a component.

HasParent()

Indicates whether the component has a parent to handle its filing.

Images

Defines the reference to a TCustomImageList list of images to be used to draw images on the component. If the TCustomImageList list is empty, then Images is nil/null. Call ImagesChanged when Images is changed.

Type:

BaseImageList

Owner

Returns the Component Owner