mirror of
https://github.com/python/cpython.git
synced 2025-11-25 04:34:37 +00:00
Refine geometry of idlelib htests (and a few other fix-ups).
This commit is contained in:
parent
cd5e388c39
commit
a748032653
19 changed files with 52 additions and 58 deletions
|
|
@ -77,20 +77,19 @@ class ListboxToolTip(ToolTipBase):
|
|||
listbox.insert(END, item)
|
||||
|
||||
def _tooltip(parent): # htest #
|
||||
root = Tk()
|
||||
root.title("Test tooltip")
|
||||
width, height, x, y = list(map(int, re.split('[x+]', parent.geometry())))
|
||||
root.geometry("+%d+%d"%(x, y + 150))
|
||||
label = Label(root, text="Place your mouse over buttons")
|
||||
top = Toplevel(parent)
|
||||
top.title("Test tooltip")
|
||||
x, y = map(int, parent.geometry().split('+')[1:])
|
||||
top.geometry("+%d+%d" % (x, y + 150))
|
||||
label = Label(top, text="Place your mouse over buttons")
|
||||
label.pack()
|
||||
button1 = Button(root, text="Button 1")
|
||||
button2 = Button(root, text="Button 2")
|
||||
button1 = Button(top, text="Button 1")
|
||||
button2 = Button(top, text="Button 2")
|
||||
button1.pack()
|
||||
button2.pack()
|
||||
ToolTip(button1, "This is tooltip text for button1.")
|
||||
ListboxToolTip(button2, ["This is","multiple line",
|
||||
"tooltip text","for button2"])
|
||||
root.mainloop()
|
||||
|
||||
if __name__ == '__main__':
|
||||
from idlelib.idle_test.htest import run
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue