summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBarry Warsaw <barry@python.org>1998-10-07 03:19:33 (GMT)
committerBarry Warsaw <barry@python.org>1998-10-07 03:19:33 (GMT)
commitc958043233e27d07cdcb6dc663eec7049a8626b0 (patch)
tree01e1455ed6d7b31381b8d1fc2720367bc9bebf6a
parent8934af00d8a99e606729b96c34e8da6fb9c9123c (diff)
downloadcpython-c958043233e27d07cdcb6dc663eec7049a8626b0.zip
cpython-c958043233e27d07cdcb6dc663eec7049a8626b0.tar.gz
cpython-c958043233e27d07cdcb6dc663eec7049a8626b0.tar.bz2
Better layout of options menu and inc/dec buttons
-rw-r--r--Tools/pynche/DetailsViewer.py29
1 files changed, 16 insertions, 13 deletions
diff --git a/Tools/pynche/DetailsViewer.py b/Tools/pynche/DetailsViewer.py
index b82e008..35e4853 100644
--- a/Tools/pynche/DetailsViewer.py
+++ b/Tools/pynche/DetailsViewer.py
@@ -85,42 +85,45 @@ class DetailsViewer:
frame = self.__frame = Frame(root)
frame.pack(expand=YES, fill=X)
self.__l1 = Label(frame, text='Move Sliders:')
- self.__l1.grid(row=1, column=0, columnspan=3, sticky=E)
+ self.__l1.grid(row=1, column=0, sticky=E)
self.__rvar = IntVar()
self.__rvar.set(4)
self.__radio1 = Checkbutton(frame, text='Red',
variable=self.__rvar,
command=self.__effect,
onvalue=4, offvalue=0)
- self.__radio1.grid(row=1, column=3, columnspan=3, sticky=W)
+ self.__radio1.grid(row=1, column=1, sticky=W)
self.__gvar = IntVar()
self.__gvar.set(2)
self.__radio2 = Checkbutton(frame, text='Green',
variable=self.__gvar,
command=self.__effect,
onvalue=2, offvalue=0)
- self.__radio2.grid(row=2, column=3, columnspan=3, sticky=W)
+ self.__radio2.grid(row=2, column=1, sticky=W)
self.__bvar = IntVar()
self.__bvar.set(1)
self.__radio3 = Checkbutton(frame, text='Blue',
variable=self.__bvar,
command=self.__effect,
onvalue=1, offvalue=0)
- self.__radio3.grid(row=3, column=3, columnspan=3, sticky=W)
+ self.__radio3.grid(row=3, column=1, sticky=W)
self.__l2 = Label(frame)
- self.__l2.grid(row=4, column=3, columnspan=3, sticky=W)
+ self.__l2.grid(row=4, column=1, sticky=W)
self.__effect()
#
# Boundary behavior
self.__l3 = Label(frame, text='At boundary:')
- self.__l3.grid(row=5, column=0, columnspan=3, sticky=E)
+ self.__l3.grid(row=5, column=0, sticky=E)
self.__boundvar = StringVar()
self.__boundvar.set(STOP)
self.__omenu = OptionMenu(frame, self.__boundvar,
STOP, WRAP, RATIO, GRAV)
- self.__omenu.grid(row=5, column=3, columnspan=3, sticky=W)
+ self.__omenu.grid(row=5, column=1, sticky=W)
+ self.__omenu.configure(width=17)
#
# Buttons
+ frame = self.__btnframe = Frame(frame)
+ frame.grid(row=0, column=0, columnspan=2, sticky='EW')
self.__down25 = Button(frame, text='-25',
command=self.__minus25)
self.__down10 = Button(frame, text='-10',
@@ -133,12 +136,12 @@ class DetailsViewer:
command=self.__plus10)
self.__up25 = Button(frame, text='+25',
command=self.__plus25)
- self.__down25.grid(row=0, column=0)
- self.__down10.grid(row=0, column=1)
- self.__down1.grid(row=0, column=2)
- self.__up1.grid(row=0, column=3)
- self.__up10.grid(row=0, column=4)
- self.__up25.grid(row=0, column=5)
+ self.__down25.pack(expand=YES, fill=X, side=LEFT)
+ self.__down10.pack(expand=YES, fill=X, side=LEFT)
+ self.__down1.pack(expand=YES, fill=X, side=LEFT)
+ self.__up1.pack(expand=YES, fill=X, side=LEFT)
+ self.__up10.pack(expand=YES, fill=X, side=LEFT)
+ self.__up25.pack(expand=YES, fill=X, side=LEFT)
def __effect(self, event=None):
tie = self.__rvar.get() + self.__gvar.get() + self.__bvar.get()