summaryrefslogtreecommitdiffstats
path: root/Lib/idlelib/search.py
diff options
context:
space:
mode:
authorTerry Jan Reedy <tjreedy@udel.edu>2019-01-03 03:04:06 (GMT)
committerGitHub <noreply@github.com>2019-01-03 03:04:06 (GMT)
commitaff0adabf3ace62073076f4ce875ff568f2d3180 (patch)
tree157f0f7ad9d4f62e55cc99c000f6e82af30a0d01 /Lib/idlelib/search.py
parente9a044ec16989bd4b39763c0588c17200a925350 (diff)
downloadcpython-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/search.py')
-rw-r--r--Lib/idlelib/search.py15
1 files changed, 9 insertions, 6 deletions
diff --git a/Lib/idlelib/search.py b/Lib/idlelib/search.py
index 6223661..6e5a0c7 100644
--- a/Lib/idlelib/search.py
+++ b/Lib/idlelib/search.py
@@ -75,13 +75,16 @@ class SearchDialog(SearchDialogBase):
def _search_dialog(parent): # htest #
"Display search test box."
from tkinter import Toplevel, Text
- from tkinter.ttk import Button
+ from tkinter.ttk import Frame, Button
- box = Toplevel(parent)
- box.title("Test SearchDialog")
+ top = Toplevel(parent)
+ top.title("Test SearchDialog")
x, y = map(int, parent.geometry().split('+')[1:])
- box.geometry("+%d+%d" % (x, y + 175))
- text = Text(box, inactiveselectbackground='gray')
+ top.geometry("+%d+%d" % (x, y + 175))
+
+ frame = Frame(top)
+ frame.pack()
+ text = Text(frame, inactiveselectbackground='gray')
text.pack()
text.insert("insert","This is a sample string.\n"*5)
@@ -90,7 +93,7 @@ def _search_dialog(parent): # htest #
_setup(text).open(text)
text.tag_remove('sel', '1.0', 'end')
- button = Button(box, text="Search (selection ignored)", command=show_find)
+ button = Button(frame, text="Search (selection ignored)", command=show_find)
button.pack()
if __name__ == '__main__':