Home | History | Annotate | Download | only in idlelib

Lines Matching full:text

6 def _setup(text):
7 root = text._root()
13 def find(text):
14 pat = text.get("sel.first", "sel.last")
15 return _setup(text).open(text,pat)
17 def find_again(text):
18 return _setup(text).find_again(text)
20 def find_selection(text):
21 return _setup(text).find_selection(text)
32 self.find_again(self.text)
34 def find_again(self, text):
36 self.open(text)
40 res = self.engine.search_text(text)
47 selfirst = text.index("sel.first")
48 sellast = text.index("sel.last")
50 text.bell()
54 text.tag_remove("sel", "1.0", "end")
55 text.tag_add("sel", first, last)
56 text.mark_set("insert", self.engine.isback() and first or last)
57 text.see("insert")
60 text.bell()
63 def find_selection(self, text):
64 pat = text.get("sel.first", "sel.last")
67 return self.find_again(text)
74 text = Text(root)
75 text.pack()
76 text.insert("insert","This is a sample string.\n"*10)
79 text.tag_add(SEL, "1.0", END)
80 s = _setup(text)
81 s.open(text)
82 text.tag_remove(SEL, "1.0", END)
84 button = Button(root, text="Search", command=show_find)