Defines standard actions to be used in Action Lists in the LCL.

stdactns.pas contains TAction descendents which can be used in TActionList for common actions performed using controls. This file is part of the Lazarus Component Library (LCL).

The following components are registered but not displayed on the Lazarus IDE component palette:

Edit Actions

  • TEditCut
  • TEditCopy
  • TEditPaste
  • TEditSelectAll
  • TEditUndo
  • TEditDelete

Search Actions

  • TSearchFind
  • TSearchReplace
  • TSearchFindFirst
  • TSearchFindNext

Help Actions

  • THelpAction
  • THelpContents
  • THelpTopicSearch
  • THelpOnHelp
  • THelpContextAction

Dialog Actions

  • TFontEdit
  • TColorSelect

File Actions

  • TFileOpen
  • TFileOpenWith
  • TFileSaveAs
  • TFileExit
THintAction - standard action for dealing with requests for a Hint. TEditAction - base class for actions associated with the various Edit menu options. TAction FControl - local variable holding the Edit control associated with this action. SetControl - specifies the Edit control associated with this action. Handles notifcations when a control in the class instance is added or removed. Destructor for the class instance. Calls the inherited destructor. The Edit Control associated with this action.

Limits the target for the action to a specific control.

TEditCut- standard action associated with the Edit Cut menu option. TEditCopy - standard action associated with the Edit Copy menu option. TEditPaste - standard action associated with the Edit Paste menu option. TEditSelectAll - standard action associated with the Edit Select All menu option. TEditUndo - standard action associated with the Edit Undo menu option. TEditDelete - standard action associated with the Edit Delete menu option. THelpAction - base class for actions associated with the various Help menu options. TAction Constructor for the class instance. Calls the inherited constructor. Owner of the class instance. THelpContents - standard action associated with the Help Contents menu option. THelpTopicSearch - standard action associated with the Help Topic Search menu option. THelpOnHelp - standard action associated with the Help On Help menu item (i.e. how to get help). THelpContextAction - standard action for providing context-sensitive Help. TCommonDialogClass - class of TCommonDialog. TCommonDialogAction - base class for providing actions associated with Dialogs. TCustomAction FDialog - local variable holding the Dialog associated with this action. DoAccept - perform the code for the OnAccept event. Performs the BeforeExecute notification when assigned. DoCancel - perform the code for the OnCancel event. GetDialogClass - returns the class type for the dialog associated with this action. Create a new instance of the class type used in the Dialog property.

Calls GetDialogClass to get the class reference used to create the dialog instance. When assigned, it is created and stored in the Dialog property. It Name is set to the ClassName for the class reference, and it is marked as a sub-component for the class instance.

Constructor for the class instance. Owner for the class instance. ExecuteResult - the result of the execution: True if successful. BeforeExecute - event handler for performance before execution of the action. OnAccept - event handler for a press of the Accept button. OnCancel - event handler for a press of the Cancel button. TFileAction - base class for providing actions associated with various file dialogs and menu options. Gets the value for the FileName property. Value for the property. Sets the value for the FileName property. New value for the property. GetDialog - returns a TOpenDialog for use in this File action. TOpenDialog TOpenDialog instance used in the class. File name returned from the dialog in the action.

FileName is a TFileName property with the file name returned in the Open dialog for the action.

TFileOpen - standard action (including opening a dialog) associated with the File Open menu option. Gets the value for the Dialog property. Value for the property. Gets the class reference used to create the Dialog for the action. TCommonDialogClass reference used to create the Dialog. The Open Dialog to be used with this action.

Dialog is a read-only TOpenDialog property with the dialog used to select a file for the File Open action.

Indicates if the default application should be used to open the file for the action.

UseDefaultApp is a Boolean property which indicates if the default application should be used to open the selected FileName. The default value for the proprety is False.

UseDefaultApp is not used in the current LCL version.
TFileOpenWith - standard action (including opening a dialog) associated with the File Open With menu option.

TFileOpenWith is a standard action (including opening a dialog) associated with the File Open With menu option. Gives the User an opportunity to choose the application with which to open a file.

File name for the Open With action. FileName is a TFileName property with the file name used in the Open With action. AfterOpen - event handler to be performed after file is opened. TFileSaveAs - standard action (including opening a dialog) associated with the File Save As menu option.

TFileSaveAs is a standard action (including opening a dialog) associated with the File Save As menu option. Gives the user an opportunity to select or enter a name to use for saving the file.

Gets the value for the Dialog property. Value for the Dialog property. The Save Dialog to be used with this action. TFileExit - standard action (closing file and terminating application) associated with the File Exit menu option. TCustomAction TSearchAction - base class for the actions associated with the various Search menu options. FControl - local variable holding the control for use with this action. Creates the class instance used in the Dialog property.

Calls the inherited CreateDialog method, and assigns the Search method as the OnFind event handler in Dialog.

Handles notifcations when a control in the class instance is added or removed. Component for the notification. Operation for the notification. Updates the internal Control to the value in NewControl. New value for the internal Control. Performs the seach action using the Dialog options.

Performs the search action using the options and search criteria set in the Dialog property. Called from the Search method.

True when the search value is found in the text for the internal Control. Displays a dialog with a "Not Found" message. Constructor for the class instance.

Calls the inherited constructor, and sets the value for the internal Control to Nil.

Owner for the class instance. Destructor for the class instance.

Removes the free notification for the internal Control (when assigned), and calls the inherited destructor.

Performs the Search action. TSearchFind - the action associated with a Search and Find dialog (as opposed to search and replace).

Returns the TFindDialog class type in TSearchFind.

Returns TFindDialog for the action. The FindDialog to be used with this action. TSearchReplace - action associated with the Search and Replace menu option and dialogs. Replace - the method to perform the Replace action once the specified text has been found. The ReplaceDialog to be used with this action. TSearchFindFirst - Search action to find the first match. TSearchFindNext - search action to find the next match. Constructor for the class instance. Owner of the class instance. Handles notifcations when a component used in the class instance is added or removed. The SearchFind action to use for searching. TFontEdit - standard action for opening a Font Edit dialog. Gets the value for the Dialog property. Value for the property. The FontDialog to use for this action. TColorSelect - standard action for opening a Color Selection dialog. The ColorDialog to use with this action. Registers component for use in the Lazarus IDE.

The following components are registered but not displayed on the Lazarus IDE component palette:

Edit Actions

  • TEditCut
  • TEditCopy
  • TEditPaste
  • TEditSelectAll
  • TEditUndo
  • TEditDelete

Search Actions

  • TSearchFind
  • TSearchReplace
  • TSearchFindFirst
  • TSearchFindNext

Help Actions

  • THelpAction
  • THelpContents
  • THelpTopicSearch
  • THelpOnHelp
  • THelpContextAction

Dialog Actions

  • TFontEdit
  • TColorSelect

File Actions

  • TFileOpen
  • TFileOpenWith
  • TFileSaveAs
  • TFileExit