iwidgets::finddialog(1)
π NAME π
okay bestie, gather round β this is the manual page for iwidgets::finddialog(1), and it does exactly what the name says: Create and manipulate a find dialog widget β¨
πΈ SYNOPSIS πΈ
iwidgets::finddialog pathName ?options?
that's it. that's the whole summoning ritual. πͺ
π¦ INHERITANCE π¦
the family tree, and yes she comes from good stock:
itk::Toplevel β iwidgets::Shell β iwidgets::Dialogshell β iwidgets::Finddialog
four generations deep, main character energy all the way down π
β¨ STANDARD OPTIONS β¨
activeBackgroundactiveForegroundbackgroundborderWidthcursordisabledForegroundfontforegroundhighlightColorhighlightThicknessinsertBackgroundinsertBorderWidthinsertOffTimeinsertOnTimeinsertWidthselectBackgroundselectBorderWidthselectColorselectForeground
fr fr, see the options manual entry for the deets on all of the standard options π
π ASSOCIATED OPTIONS π
selectColorβ the checkbutton one. See thecheckbuttonwidget manual entry for details on the above associated options π«ΆselectColorβ yep, again, but this time it's the entryfield one. See theentryfieldwidget manual entry for details on the above associated options π«ΆlabelFontβ see thelabeledwidgetwidget manual entry for details on the above associated options π«Ά
two different selectColors living their separate lives, iykyk π
π INHERITED OPTIONS π
buttonBoxPadXbuttonBoxPadYbuttonBoxPospadXpadYseparatorthickness
all seven of those? straight from the dialogshell widget manual entry, go peek for details π
heightmastermodalitywidth
these four came over from the shell widget manual entry β details live there π¦
title
and title is the Toplevel one, see the Toplevel widget manual entry for details β
π₯ WIDGET-SPECIFIC OPTIONS π₯
now THIS is the good part, the options that are just hers β¨
-clearcommandβ Name:clearCommand, Class:Command, Command-Line Switch:-clearcommand. You hand it a command and it gets invoked following a clear operation. The whole point is notification β letting you know the clear actually happened so other stuff can react, like disabling a find again menu π«-matchcommandβ Name:matchCommand, Class:Command, Command-Line Switch:-matchcommand. A command invoked following a find operation. It's called with a match point as an argument, and that match point identifies exactly where in the text or scrolledtext widget the match is located. If no match was found, that match point is{}. Again it's a notification thing β the find operation finished, so go do your other actions, like disabling a find again menu option when the match point came back as{}π-patternbackgroundβ Name:patternBackground, Class:Background, Command-Line Switch:-patternbackground. The background color of the text matching the search pattern. Takes any of the forms accepted byTk_GetColor. Default isgray44π¨-patternforegroundβ Name:patternForeground, Class:Background, Command-Line Switch:-patternforeground. The foreground color of the text matching the search pattern. Any of the forms accepted byTk_GetColor. Default iswhiteπ€-searchbackgroundβ Name:searchBackground, Class:Background, Command-Line Switch:-searchbackground. The background color of the line containing the matching the search pattern. Any of the forms accepted byTk_GetColor. Default isgray77π«οΈ-searchforegroundβ Name:searchForeground, Class:Background, Command-Line Switch:-searchforeground. The foreground color of the line containing the matching the search pattern. Any of the forms accepted byTk_GetColor. Default isblackπ€-textwidgetβ Name:textWidget, Class:TextWidget, Command-Line Switch:-textwidget. Specifies the text or scrolledtext widget to be searched π―
π DESCRIPTION π
so what IS this thing? The iwidgets::finddialog command creates a find dialog that works in conjunction with a text or scrolledtext widget to provide a means of performing search operations. The user gets prompted for a text pattern to be found in the text or scrolledtext widget π
And the search can be for all occurances, by regular expression, considerate of the case, or backwards π
β METHODS β
The iwidgets::finddialog command creates a new Tcl command whose name is pathName. That command is what you use to invoke various operations on the widget. General form:
pathName option ?arg arg ...?
option and the args determine the exact behavior of the command. The following commands are possible for finddialog widgets π
π« INHERITED METHODS π«
addbuttonconfiguredefaulthideinvokeshow
see the buttonbox widget manual entry for details on the above inherited methods π«Ά
activatecenterdeactivate
see the shell widget manual entry for details on the above inherited methods π
π WIDGET-SPECIFIC METHODS π
pathName cget option
Returns the current value of the configuration option given by option. option may have any of the values accepted by the iwidgets::finddialog command.
pathName clear
Clears the pattern in the entry field and the pattern matchin indicators in the text or scrolledtext widget. π§Ή
pathName configure ?option? ?value option value ...?
Query or modify the configuration options of the widget. If no option is specified, returns a list describing all of the available options for pathName (see Tk_ConfigureInfo for information on the format of this list). If option is specified with no value, then the command returns a list describing the one named option (this list will be identical to the corresponding sublist of the value returned if no option is specified). If one or more option-value pairs are specified, then the command modifies the given widget option(s) to have the given value(s); in this case the command returns an empty string. option may have any of the values accepted by the iwidgets::finddialog command.
pathName find
Search for a specific text string in the text widget given by the -textwidget option. This method is the standard callback for the Find button. It is made available such that it can be bound to a find again action. π
π§© COMPONENTS π§©
allβ Class:Checkbutton. Theallcomponent specifies that all the matches of the pattern should be found when performing the search. See thecheckbuttonwidget manual entry for details on theallcomponent item βbackwardsβ Class:Checkbutton. Thebackwardscomponent specifies that the search should continue in a backwards direction towards the beginning of the text or scrolledtext widget. See thecheckbuttonwidget manual entry for details on thebackwardscomponent item βͺcaseβ Class:Checkbutton. Thecasecomponent specifies that the case of the pattern should be taken into consideration when performing the search. See thecheckbuttonwidget manual entry for details on thecasecomponent item πpatternβ Class:Entryfield. Thepatterncomponent provides the pattern entry field. See theentryfieldwidget manual entry for details on thepatterncomponent item β¨οΈregexpβ Class:Checkbutton. Theregexpcomponent specifies that the pattern is a regular expression. See thecheckbuttonwidget manual entry for details on theregexpcomponent item π§
π EXAMPLE π
here's the whole vibe in action, no cap:
package require Iwidgets 4.0
iwidgets::scrolledtext .st
pack .st
.st insert end "Now is the time for all good men\n"
.st insert end "to come to the aid of their country"
iwidgets::finddialog .fd -textwidget .st
.fd center .st
.fd activate
literally that's it and you're searching π¦
π AUTHOR π
Mark L. Ulferts π
π KEYWORDS π
finddialog, dialogshell, shell, widget
and that's a wrap bestie!! this was the iwidgets::finddialog(1) page from the Tk corner of the world β go find yourself some patterns, slay, and remember: match point {} means she didn't find it, no hard feelings πβ¨π
π¦ where this page comes from
- debian bookworm: iwidgets4-doc 4.1.1-2.1
- debian trixie: iwidgets4-doc 4.1.1-4
- ubuntu jammy: iwidgets4-doc 4.1.1-2.1
- ubuntu noble: iwidgets4-doc 4.1.1-2.1
- ubuntu resolute: iwidgets4-doc 4.1.1-4
- ubuntu stonking: iwidgets4-doc 4.1.1-4
- Copyright (c) 1995 DSC Technologies Corporation
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms