ActionList¶
Qualified name: delphifmx.ActionList
- class ActionList¶
Bases:
CustomActionList
Maintains a list of actions that can be used by components such as controls, menu items, and tool buttons. Use Action lists to centralize the responses to user actions. Action list components maintain a list of actions that are available to the client controls in an application. You can add action list components to your form from the Standard page of the component palette. TActionList lets you set up actions using the Action List editor. Double-click the action list to display the Action List editor, from which you can add, delete, and rearrange actions. TActionList extends the TCustomActionList class redeclaring the public Name, State, OnChange, OnExecute, OnStateChange, and OnUpdate properties and events with the published visibility; therefore, these properties and events can be managed in the Object Inspector at design time.
Code Examples FMX.ActionsDemo Sample FMX.PhotoEditorDemo Sample
Methods
Connects methods to component events if they are named using the following pattern: Prefix_ComponentName_EventName.
Returns the parent of a component.
Indicates whether the component has a parent to handle its filing.
Attributes
Indicates the number of actions in the action list.
Lists the actions maintained by the action list.
ClassName
Returns the TObject.ClassName
ComObject
Specifies the interface reference implemented by the component.
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.
Returns an iterator over the owned components
DesignInfo
Contains information used by the Form designer.
Defines the reference to a TCustomImageList list of images to be used to draw images on the component.
Specifies the name of the component as referenced in code.
Observers
Indicates the TObservers object added to the TComponent.
Returns the Component Owner
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
- 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
- Name¶
Specifies the name of the component as referenced in code. Use Name to change the name of a component to reflect its purpose in the current application. By default, the IDE assigns sequential names based on the type of the component, such as ‘Button1’, ‘Button2’, and so on. Use Name to refer to the component in code.
Warning: Changing Name at run time causes any references to the old name to become undefined. Any subsequent code that uses the old name will cause an exception.
- Type:
str
- Owner¶
Returns the Component Owner
- State¶
Indicates whether the actions in the action list respond when the user triggers a client object. State can be one of the constants defined in the TActionListState type: asNormal, asSuspended, and asSuspendedEnabled.
- Type:
ActionListState