Make dialog visible on top of others and ready to use.
(self, text, searchphrase=None)
| 49 | self.top = None |
| 50 | |
| 51 | def open(self, text, searchphrase=None): |
| 52 | "Make dialog visible on top of others and ready to use." |
| 53 | self.text = text |
| 54 | if not self.top: |
| 55 | self.create_widgets() |
| 56 | else: |
| 57 | self.top.deiconify() |
| 58 | self.top.tkraise() |
| 59 | self.top.transient(text.winfo_toplevel()) |
| 60 | if searchphrase: |
| 61 | self.ent.delete(0,"end") |
| 62 | self.ent.insert("end",searchphrase) |
| 63 | self.ent.focus_set() |
| 64 | self.ent.selection_range(0, "end") |
| 65 | self.ent.icursor(0) |
| 66 | self.top.grab_set() |
| 67 | |
| 68 | def close(self, event=None): |
| 69 | "Put dialog away for later use." |
nothing calls this directly
no test coverage detected