Make dialog visible on top of others and ready to use. Extend the SearchDialogBase open() to set the initial value for globvar. Args: text: Multicall object containing the text information. searchphrase: String phrase to search. io: iomen
(self, text, searchphrase, io=None)
| 88 | self.recvar = BooleanVar(root) |
| 89 | |
| 90 | def open(self, text, searchphrase, io=None): |
| 91 | """Make dialog visible on top of others and ready to use. |
| 92 | |
| 93 | Extend the SearchDialogBase open() to set the initial value |
| 94 | for globvar. |
| 95 | |
| 96 | Args: |
| 97 | text: Multicall object containing the text information. |
| 98 | searchphrase: String phrase to search. |
| 99 | io: iomenu.IOBinding instance containing file path. |
| 100 | """ |
| 101 | SearchDialogBase.open(self, text, searchphrase) |
| 102 | if io: |
| 103 | path = io.filename or "" |
| 104 | else: |
| 105 | path = "" |
| 106 | dir, base = os.path.split(path) |
| 107 | head, tail = os.path.splitext(base) |
| 108 | if not tail: |
| 109 | tail = ".py" |
| 110 | self.globvar.set(os.path.join(dir, "*" + tail)) |
| 111 | |
| 112 | def create_entries(self): |
| 113 | "Create base entry widgets and add widget for search path." |