diff options
author | Georg Brandl <georg@python.org> | 2010-12-30 21:33:07 +0000 |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2010-12-30 21:33:07 +0000 |
commit | 7fafbc95c0c963438197c9a43fe893c4ea6fe759 (patch) | |
tree | 5c9ceda4bdc5260236a230554b9ed56b8c0cdbd3 /Demo/tkinter/matt/placer-simple.py | |
parent | 6f17e2df29a865a29447531e89fb22be710e382d (diff) | |
download | cpython-7fafbc95c0c963438197c9a43fe893c4ea6fe759.tar.gz cpython-7fafbc95c0c963438197c9a43fe893c4ea6fe759.zip |
More cleanup: Move some demos into a dedicated Tools/demo dir, move 2to3 demo to Tools, and remove all the other Demo content.
Diffstat (limited to 'Demo/tkinter/matt/placer-simple.py')
-rw-r--r-- | Demo/tkinter/matt/placer-simple.py | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/Demo/tkinter/matt/placer-simple.py b/Demo/tkinter/matt/placer-simple.py deleted file mode 100644 index 6be0de9ffe3..00000000000 --- a/Demo/tkinter/matt/placer-simple.py +++ /dev/null @@ -1,39 +0,0 @@ -from tkinter import * - -# This is a program that tests the placer geom manager - -def do_motion(event): - app.button.place(x=event.x, y=event.y) - -def dothis(): - print('calling me!') - -def createWidgets(top): - # make a frame. Note that the widget is 200 x 200 - # and the window containing is 400x400. We do this - # simply to show that this is possible. The rest of the - # area is inaccesssible. - f = Frame(top, width=200, height=200, background='green') - - # place it so the upper left hand corner of - # the frame is in the upper left corner of - # the parent - f.place(relx=0.0, rely=0.0) - - # now make a button - f.button = Button(f, foreground='red', text='amazing', command=dothis) - - # and place it so that the nw corner is - # 1/2 way along the top X edge of its' parent - f.button.place(relx=0.5, rely=0.0, anchor=NW) - - # allow the user to move the button SUIT-style. - f.bind('<Control-Shift-Motion>', do_motion) - - return f - -root = Tk() -app = createWidgets(root) -root.geometry("400x400") -root.maxsize(1000, 1000) -root.mainloop() |