The Find Panel is implemented by the jfindpanel.tcl library; if you're a Tk programmer, you can use it in your own applications.
This document describes the Find Panel provided by version 4.1/4.4 of the jstools libraries.
(In the latter case, the rule is that it searches in the last Text widget that had the keyboard focus, so if your keyboard focus follows the mouse and you don't have to click in windows to type in them, this is the last Text widget in the application that your mouse pointer was over.)
If all you want to do is find the next occurrence of a string, you can just type the string you want to search for in the `Search for:' field, and click `Search' (or just press Return). The Find Panel will find the next occurrence of the string in the text after the insertion point (the blinking vertical bar) and select it. (If the string you typed didn't appear in the text after the insertion point, an alert panel will tell you so.)
If you want to search repeatedly through the text for a particular string, you can keep clicking on the `Search' button (or pressing Return).
To replace a string, type the search string in the `Search for:' field, and type the replacement string in the `Replace with:' field. Then click on Search to find and select the next ocurrence of the search string, and click on `Replace' to replace it and continue the search. Clicking `Replace' replaces whatever the current selection is (it doesn't necessarily have to be the result of a search) with the text in the `Replace with:' field.
You can click on `Replace All' to replace the search string (the contents of the `Search for:' field) with the replacement string (the contents of the `Replace with:' field) everywhere in the text. This should be done with some caution, of course.
(If you need to search for or substitute a newline or a tab, you can type them in the search and replace fields as Control-J and Control-I, respectively. No, it's not intuitive, but it works.)
The `Cancel' button makes the find panel go away and returns you to editing your text.
The history lists last across invocations of the same application, so if you find something in a program, quit the program, and start it up again, you still have access to the same history list. Whether the history list lasts across applications depends on the particular applications.
Using the Find Panel with a noneditable window is a little tricky, because the Find Panel searches from the insertion point in a text window. In an editable window, the insertion point is displayed as a blinking vertical bar, but in a noneditable window it's invisible. So it may be hard to tell where the search is starting from. If you can't find a string you're fairly sure is in the text, you can try scrolling the text window up to the top and clicking in the upperleft corner to set the insertion point at the beginning of the text.
If the `Casesensitive' checkbutton is selected, then the Find Panel will only search for an exact match, so that if you search for `because', you won't find `Because'. Normally, case is ignored when searching, so `because' and `Because' (and `BECAUSE' and `becausE') will match.
In any case, if you search for `because of' with one space, you won't find `because of' with two spaces.
If the `Regex' checkbutton is selected, then searching and replacement will be done using regular expressions rather than fixed strings. Regular expressions allow you to express more complicated patterns than just specific sequences of characters; for instance, you could search for all words that are in all capitals, or all occurrences of a number in parentheses. You can also use fragments of the matched text in the replacement text. For the details of regular expressions, see the Tcl regexp(n) and regsub(n) manual pages. (Another place to look for information is the REGULAR EXPRESSIONS section of the ed(1) manual page, although the regular expressions in ed(1) differ slightly from those used by Tcl.)
Currently, you can only search forward for regular expressions; if you have both `Regex' and `Backwards' selected, you'll get a notice telling you so when you click `Search'.