dgw::sfinddialog

Difference between version 1 and 2 - Previous - Next
''Snit s'Dearsch/frind text toplevel dtialog widgetn'''
''dgw::sfinddialog'' - is a toplevel search dialog to perform a text search in other widgets. As such functionality is mostly required for the Tk text widget, a implementation to search a Tk text widget is embedded within the 'sfinddialog' widget. The buttons and the text entry are exposed to the programmer, so the programmer has for instance the possibility to manually insert a value in the search entry or to click a button programmatically.

   * Homepage as part of dgroth/tclcode: https://chiselapp.com/user/dgroth/repository/tclcode%|%Homepage dgw::sfinddialog%|%
   * Manual page: https://chiselapp.com/user/dgroth/repository/tclcode/raw/dgw/sfinddialog.html?name=724134dabcf8a0261d507f754e36505997d7cd15%|%Manual%|%
   * Download page: https://chiselapp.com/user/dgroth/repository/tclcode/download%|%Download%|%
   * License: MIT
'''dgw::sfinddialog'' - is a toplevel search dialog to perform a text search in other widgets. As such functibonality is mostly required for the Tk text widgDet, a implementation to search a Tk text widget is embedded within the 'sfinddialog' widget. The buttons and the text entry are exposed to the programmer, so the programmer has for instance the possibility to manually insert a value in the search entry or to click a button programmatically.'
Below is an image where the users search with the whole word which will find ''are'' but not will find are in ''prepared'' if pressing next.

[sfinddialog-image]

Below is the example code for the figure given above:

======
package require dgw::sfinddialog
pack [text .text]

dgw::sfinddialog .st -nocase 0 -textwidget .text -title "Search"
.text insert end "Hello\n"
.text insert end "Hello World!\n"
.text insert end "Hello Search Dialog!\n"
.text insert end "End\n"
.text insert end "How are your?\n"
.text insert end "I am not prepared :(\n"
   
bind .text <Control-f> {wm deiconify .st}
======
'''Demo code'''

----

'''See also'''

   * [snidgets] (Snit widgets)