Digg StumbleUpon LinkedIn YouTube Flickr Facebook Twitter RSS Reset
Comments Off

Python: Checkbutton and RadioButton Example

Your ads will be inserted here by

Easy AdSense.

Please go to the plugin admin page to paste your ad code.

Python:  Checkbutton and RadioButton Example
{filelink=15420}

from Tkinter import *
class AllTkinterWidgets:
    def __init__(self, master):
        frame = Frame(master, width=500, height=400, bd=1)
        frame.pack()
        iframe1 = Frame(frame, bd=2, relief=SUNKEN)
        Checkbutton(iframe1, text='Choose').pack(side=LEFT, padx=5)
        v=IntVar()
        Radiobutton(iframe1, text='Option 1', variable=v,
                    value=3).pack(side=RIGHT, anchor=W)
        Radiobutton(iframe1, text='Option 2', variable=v,
                    value=2).pack(side=RIGHT, anchor=W)
        Radiobutton(iframe1, text='Option 3', variable=v,
                    value=1).pack(side=RIGHT, anchor=W)
        iframe1.pack(expand=1, fill=X, pady=10, padx=5)
win = Tk()
all = AllTkinterWidgets(win)
win.title('How to use Checkbutton and RadioButton')
win.mainloop()

Users who found this page were searching for:

  • check button python tkinter
  • python tk sample
  • checkbutton python for loop
  • tk python radio button
  • tkinter python radio button
  • python checkbutton get
  • python radiobutton
  • tkinter checkbutton example
  • python tkinter checkbox
  • python tkinter entry methods

No comments yet.

Leave a Comment

Switch to our mobile site