TDlgFind

Source: source/classes/dlgfind.prg

Inherits from: TDialog

TDlgFind wraps the standard Windows Find Text common dialog (FindText API). It is a modeless dialog managed by Windows that allows users to search for text within an application. The dialog sends notification messages back to the caller when the user clicks "Find Next".

Methods

MethodDescription
New( cText, oWnd, bSearch )Create the Find dialog with initial text, owner window, and search action block

Free Function

FunctionDescription
DlgFindText( cText, oWnd, bSearch ) -> oDlgConvenience function that creates and returns a TDlgFind object

Example: Find Dialog with Search Callback

#include "FiveWin.ch"

function Main()

   local oWnd, oDlg

   DEFINE WINDOW oWnd TITLE "Find Demo" SIZE 600, 400

   oDlg = DlgFindText( "search text", oWnd, {|cText,lDir| MySearch( cText, lDir ) } )

   ACTIVATE WINDOW oWnd CENTERED

return nil

function MySearch( cText, lForward )

   // Perform search in your edit control
   ? "Searching for:", cText, If( lForward, "forward", "backward" )

return nil

Notes

See Also