Description

Searches edit controls, including edit tables, for user-specified text.

Syntax

EditFind

Parameters

The EditFind function has the following parameters:

ParameterDescription
Instruction

Specifies the desired search request. Constants are defined in the insert EditFind_Equates.

ValueConstantAction
1EFCMD_FIND$Display the find dialog for CtrlEntID
2EFCMD_CLOSEFIND$Close the find dialog for CtrlEntID
3EFCMD_FINDNEXT$Find the next occurrence of the last string specified in the find dialog
4EFCMD_FINDPREV$Find the previous occurrence of the last string specified in the find dialog
7EFCMD_ISFINDABLE$Returns true if the find dialog is applicable to CtrlEntID
8EFCMD_ISFINDNEXTABLE$Returns true if find next/previous is applicable to CtrlEntID
CtrlEntIDThe control to search. This parameter has the window.control format.
DftFind(Optional) The string to search for.
Options

(Optional) The Boolean search options. Constants are defined in the insert EditFind_Equates.

FieldConstantDescription
1EFP_OPT_MATCHCASE$Sets the "Match case" check box
2EFP_OPT_WHOLEWORD$Sets the "Match whole word" check box
3EFP_OPT_FORWARD$Sets the "Direction" radio button (Forward=Down)

Remarks

The EditFind function supplies developers with a pre-built utility for supplying the "Find", "Find Next", and "Find Previous" items which are typically found on an "Edit" or "Search" menu. Using QuickEvents, for the "Find" menu item, select "Execute a procedure", then select the EDITFIND procedure from the Entity drop down, then specify 1,'@SELF' as the parameters. For "Find Next" and "Find Previous", change the parameter "1" to "3" and "4" respectively.

Note: EditFind will only work properly with edit line and edit box controls that have the ES_NOHIDESEL style set (hex 0x100, decimal 256). This particular style can not be set using the STYLE property. If this style is not set, the text that is highlighted by EditFind will not appear until the Find dialog is closed.

See also

If…ThenRead

  • No labels