MSV FM

[email protected]: ~ $
Path : /lib64/python2.7/Demo/tkinter/matt/
File Upload :
Current < : //lib64/python2.7/Demo/tkinter/matt/radiobutton-simple.py

from Tkinter import *

# This is a demo program that shows how to
# create radio buttons and how to get other widgets to
# share the information in a radio button.
#
# There are other ways of doing this too, but
# the "variable" option of radiobuttons seems to be the easiest.
#
# note how each button has a value it sets the variable to as it gets hit.


class Test(Frame):
    def printit(self):
        print "hi"

    def createWidgets(self):

        self.flavor = StringVar()
        self.flavor.set("chocolate")

        self.radioframe = Frame(self)
        self.radioframe.pack()

        # 'text' is the label
        # '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)
        self.radioframe.choc.pack(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)
        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):
        Frame.__init__(self, master)
        Pack.config(self)
        self.createWidgets()

test = Test()

test.mainloop()
Bethany
Bethany
0%

THE FINEST HOTEL NEAR LAKE KIVU

The Perfect Base For You

Required fields are followed by *





EC1A68011

About Us

Delicious Interior With The Pinch Of Everything

Bethany Investment group is Presbyterian church in Rwanda(EPR) company that manage Hotel and Guest house in Karongi (Bethany Hotel), ISANO branch in GIKONDO(Kigali), Kiyovu branch(Kigali), AMIZERO branch(Nyagatare-East) and Gisenyi Branch(Rubavu).

Accomodation

Get a Comfortable Room
Feel The Comfort

Get a comfortable room and feel our hotel’s comfort. Bethany Hotel features a variety of fully furnished rooms with extra space, Executive rooms, Deluxe rooms with a beautiful lake view and garden space, Deluxe rooms, comfort rooms, family rooms and standard rooms at your service.

Standard Single

Services

We Provide Top Class Facility
Especially For You

Beach BBQ Party

Kick back on the beach& and enjoy our berbecue from our masterchef

Breakfast

Kick back at our hotels& enjoy our breakfast from our masterchef

Conference Hall

Kick back at our hotels& enjoy our conference halls from all bethany branches

Enjoy with your partner

Honeymoon Package

80%

Get In Touch

Don’t Miss Any Update

    +

    Search your Room

    Required fields are followed by *