diff options
author | Terry Jan Reedy <tjreedy@udel.edu> | 2019-01-02 22:04:06 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-02 22:04:06 -0500 |
commit | aff0adabf3ace62073076f4ce875ff568f2d3180 (patch) | |
tree | 157f0f7ad9d4f62e55cc99c000f6e82af30a0d01 /Lib/idlelib/replace.py | |
parent | e9a044ec16989bd4b39763c0588c17200a925350 (diff) | |
download | cpython-git-aff0adabf3ace62073076f4ce875ff568f2d3180.tar.gz |
bpo-33987: IDLE - use ttk Frame for ttk widgets (GH-11395)
Diffstat (limited to 'Lib/idlelib/replace.py')
-rw-r--r-- | Lib/idlelib/replace.py | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/Lib/idlelib/replace.py b/Lib/idlelib/replace.py index 83cf98756b..4a834eb790 100644 --- a/Lib/idlelib/replace.py +++ b/Lib/idlelib/replace.py @@ -205,12 +205,12 @@ class ReplaceDialog(SearchDialogBase): def _replace_dialog(parent): # htest # from tkinter import Toplevel, Text, END, SEL - from tkinter.ttk import Button + from tkinter.ttk import Frame, Button - box = Toplevel(parent) - box.title("Test ReplaceDialog") + top = Toplevel(parent) + top.title("Test ReplaceDialog") x, y = map(int, parent.geometry().split('+')[1:]) - box.geometry("+%d+%d" % (x, y + 175)) + top.geometry("+%d+%d" % (x, y + 175)) # mock undo delegator methods def undo_block_start(): @@ -219,7 +219,9 @@ def _replace_dialog(parent): # htest # def undo_block_stop(): pass - text = Text(box, inactiveselectbackground='gray') + frame = Frame(top) + frame.pack() + text = Text(frame, inactiveselectbackground='gray') text.undo_block_start = undo_block_start text.undo_block_stop = undo_block_stop text.pack() @@ -231,7 +233,7 @@ def _replace_dialog(parent): # htest # replace(text) text.tag_remove(SEL, "1.0", END) - button = Button(box, text="Replace", command=show_replace) + button = Button(frame, text="Replace", command=show_replace) button.pack() if __name__ == '__main__': |