mirror of
https://github.com/python/cpython.git
synced 2025-07-23 03:05:38 +00:00
Updated for Python 1.4
This commit is contained in:
parent
c30e95f4b0
commit
89cb67bb64
43 changed files with 731 additions and 961 deletions
|
@ -26,34 +26,30 @@ class Test(Frame):
|
|||
# 'variable' is the name of the variable that all these radio buttons share
|
||||
# 'value' is the value this variable takes on when the radio button is selected
|
||||
# 'anchor' makes the text appear left justified (default is centered. ick)
|
||||
self.radioframe.choc = Radiobutton (self.radioframe, {"text" : "Chocolate Flavor",
|
||||
"variable" : self.flavor,
|
||||
"value" : "chocolate",
|
||||
"anchor" : "w",
|
||||
Pack : {"side" : "top", "fill" : "x"}})
|
||||
self.radioframe.choc = Radiobutton(
|
||||
self.radioframe, text="Chocolate Flavor",
|
||||
variable=self.flavor, value="chocolate",
|
||||
anchor=W)
|
||||
self.radioframe.choc.pack(fill=X)
|
||||
|
||||
self.radioframe.straw = Radiobutton (self.radioframe, {"text" : "Strawberry Flavor",
|
||||
"variable" : self.flavor,
|
||||
"anchor" : "w",
|
||||
"value" : "strawberry",
|
||||
Pack : {"side" : "top", "fill" : "x"}})
|
||||
|
||||
self.radioframe.lemon = Radiobutton (self.radioframe, {"text" : "Lemon Flavor",
|
||||
"anchor" : "w",
|
||||
"variable" : self.flavor,
|
||||
"value" : "lemon",
|
||||
Pack : {"side" : "top", "fill" : "x"}})
|
||||
self.radioframe.straw = Radiobutton(
|
||||
self.radioframe, text="Strawberry Flavor",
|
||||
variable=self.flavor, value="strawberry",
|
||||
anchor=W)
|
||||
self.radioframe.straw.pack(fill=X)
|
||||
|
||||
self.radioframe.lemon = Radiobutton(
|
||||
self.radioframe, text="Lemon Flavor",
|
||||
variable=self.flavor, value="lemon",
|
||||
anchor=W)
|
||||
self.radioframe.lemon.pack(fill=X)
|
||||
|
||||
# this is a text entry that lets you type in the name of a flavor too.
|
||||
self.entry = Entry(self, {"textvariable" : self.flavor,
|
||||
Pack : {"side" : "top", "fill" : "x"}})
|
||||
self.QUIT = Button(self, {'text': 'QUIT',
|
||||
'fg': 'red',
|
||||
'command': self.quit})
|
||||
|
||||
self.QUIT.pack({'side': 'bottom', 'fill': 'both'})
|
||||
|
||||
self.entry = Entry(self, textvariable=self.flavor)
|
||||
self.entry.pack(fill=X)
|
||||
self.QUIT = Button(self, text='QUIT', foreground='red',
|
||||
command=self.quit)
|
||||
self.QUIT.pack(side=BOTTOM, fill=BOTH)
|
||||
|
||||
|
||||
def __init__(self, master=None):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue