diff options
author | Terry Jan Reedy <tjreedy@udel.edu> | 2019-01-03 03:04:06 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-03 03:04:06 (GMT) |
commit | aff0adabf3ace62073076f4ce875ff568f2d3180 (patch) | |
tree | 157f0f7ad9d4f62e55cc99c000f6e82af30a0d01 /Lib/idlelib/grep.py | |
parent | e9a044ec16989bd4b39763c0588c17200a925350 (diff) | |
download | cpython-aff0adabf3ace62073076f4ce875ff568f2d3180.zip cpython-aff0adabf3ace62073076f4ce875ff568f2d3180.tar.gz cpython-aff0adabf3ace62073076f4ce875ff568f2d3180.tar.bz2 |
bpo-33987: IDLE - use ttk Frame for ttk widgets (GH-11395)
Diffstat (limited to 'Lib/idlelib/grep.py')
-rw-r--r-- | Lib/idlelib/grep.py | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/Lib/idlelib/grep.py b/Lib/idlelib/grep.py index 8cc293c..873233e 100644 --- a/Lib/idlelib/grep.py +++ b/Lib/idlelib/grep.py @@ -8,7 +8,7 @@ import os import sys from tkinter import StringVar, BooleanVar -from tkinter.ttk import Checkbutton +from tkinter.ttk import Checkbutton # Frame imported in ...Base from idlelib.searchbase import SearchDialogBase from idlelib import searchengine @@ -173,15 +173,18 @@ class GrepDialog(SearchDialogBase): def _grep_dialog(parent): # htest # from tkinter import Toplevel, Text, SEL, END - from tkinter.ttk import Button + from tkinter.ttk import Frame, Button from idlelib.pyshell import PyShellFileList + top = Toplevel(parent) top.title("Test GrepDialog") x, y = map(int, parent.geometry().split('+')[1:]) top.geometry(f"+{x}+{y + 175}") flist = PyShellFileList(top) - text = Text(top, height=5) + frame = Frame(top) + frame.pack() + text = Text(frame, height=5) text.pack() def show_grep_dialog(): @@ -189,7 +192,7 @@ def _grep_dialog(parent): # htest # grep(text, flist=flist) text.tag_remove(SEL, "1.0", END) - button = Button(top, text="Show GrepDialog", command=show_grep_dialog) + button = Button(frame, text="Show GrepDialog", command=show_grep_dialog) button.pack() if __name__ == "__main__": |