ActnList.TCustomAction.DisableIfNoHandler

From RAD Studio VCL Reference
Jump to: navigation, search

Contents

Delphi Information

From ActnList.pas

	property DisableIfNoHandler: Boolean read FDisableIfNoHandler write FDisableIfNoHandler;


Unit: ActnList

Type: property

Visibility: public

Member Of: TCustomAction

C++ Information

From ActnList.hpp

	__property bool DisableIfNoHandler = {read=FDisableIfNoHandler,write=FDisableIfNoHandler};


Unit: ActnList

Type: property

Visibility: public

Member Of: TCustomAction

Description

Indicates whether client components should be disabled if no handler is found.


DisableIfNoHandler specifies whether the Enabled property of client components should be set to false if no handler can be found for the action.

When the user triggers one of the action's clients, the application makes a series of attempts to determine how the action should respond. This includes checking a number of event handlers, and, if it fails to find an event handler, locating a target control and checking for a predefined response that applies to that target control. When DisableIfNoHandler is true, if the application completes this sequence without finding any way for the action to respond to the user input, The action's Enabled property is set to false.

In addition, for some predefined actions, DisableIfNoHandler causes the action to disable itself if an event handler is required for the action to perform a meaningful task. For example, if you do not supply an OnAccept event handler to TFileOpen, then if DisableIfNoHandler is true, the action disables itself because there is no way for the application to respond when the user selects a file name in the dialog.

See Also

Personal tools
Translations
Newest Version