By default when getting the search menu, the currently highligted

text is the search term.
This commit is contained in:
Chui Tey 2002-11-06 02:18:45 +00:00
parent 110aa50cc2
commit 5a231c8f79
2 changed files with 6 additions and 2 deletions

View file

@ -11,13 +11,16 @@ class SearchDialogBase:
self.engine = engine
self.top = None
def open(self, text):
def open(self, text, searchphrase=None):
self.text = text
if not self.top:
self.create_widgets()
else:
self.top.deiconify()
self.top.tkraise()
if searchphrase:
self.ent.delete(0,"end")
self.ent.insert("end",searchphrase)
self.ent.focus_set()
self.ent.selection_range(0, "end")
self.ent.icursor(0)