Lines Matching full:text
6 def _setup(text):
8 root = text._root()
14 def find(text):
16 pat = text.get("sel.first", "sel.last")
17 return _setup(text).open(text, pat) # Open is inherited from SDBase.
19 def find_again(text):
21 return _setup(text).find_again(text)
23 def find_selection(text):
25 return _setup(text).find_selection(text)
37 self.find_again(self.text)
39 def find_again(self, text):
41 self.open(text)
45 res = self.engine.search_text(text)
52 selfirst = text.index("sel.first")
53 sellast = text.index("sel.last")
59 text.tag_remove("sel", "1.0", "end")
60 text.tag_add("sel", first, last)
61 text.mark_set("insert", self.engine.isback() and first or last)
62 text.see("insert")
68 def find_selection(self, text):
69 pat = text.get("sel.first", "sel.last")
72 return self.find_again(text)
77 from tkinter import Toplevel, Text
84 text = Text(box, inactiveselectbackground='gray')
85 text.pack()
86 text.insert("insert","This is a sample string.\n"*5)
89 text.tag_add('sel', '1.0', 'end')
90 _setup(text).open(text)
91 text.tag_remove('sel', '1.0', 'end')
93 button = Button(box, text="Search (selection ignored)", command=show_find)