GUIs - A Modest Proposal
rantingrick
rantingrick at gmail.com
Tue Jun 15 01:35:03 EDT 2010
On Jun 14, 11:08 pm, Stephen Hansen <me+list/pyt... at ixokai.io> wrote:
<snip>
> Does not perform to spec. Quote, "Inside of A, there are four items in a
> vertical line. The bottom which takes up half of the total vertical
> space, and the top three share the rest.
No problem, check this out...
import Tkinter as tk
app = tk.Tk()
app.geometry('400x400+20+20')
# Left
tk.Label(app, text='C', bg='red', width=20).place(rely=0.0,
relheight=0.1667, width=200)
tk.Label(app, text='D', bg='blue', width=20).place(rely=0.1667,
relheight=0.1667, width=200)
tk.Label(app, text='E', bg='green', width=20).place(rely=0.3333,
relheight=0.1667, width=200)
tk.Label(app, text='F', bg='white', width=20).place(rely=0.5,
relheight=0.5, width=200)
# Right
tk.Label(app, text='G', bg='purple').place(x=200, rely=0.0,
relheight=0.333, relwidth=1)
tk.Label(app, text='H', bg='orange').place(x=200, rely=0.3333,
relheight=0.777, relwidth=1)
app.mainloop()
However *your* code does not perform to your own spec! You said
this...
> Inside of B, G is one third the size of H.
If you mean that G should be one-third the "height" of H then your
code (and yes i have the new version that does not blow chunks!) does
not follow this spec! Better re-check my friend. ;-)
More information about the Python-list
mailing list