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

from Tkinter import *
class AllTkinterWidgets:
    def __init__(self, master):
        frame = Frame(master, width=500, height=400, bd=1)
        iframe1 = Frame(frame, bd=2, relief=SUNKEN)
        Checkbutton(iframe1, text='Choose').pack(side=LEFT, padx=5)
        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')

Users who found this page were searching for:

  • forced a checkbutton python
  • tkinter python radio button
  • examples of select() with radiobuttons in Tkinter
  • python Radiobutton examples
  • examples to use checkbutton in python
  • checkbutton python
  • radiobutton program in python
  • python programming using radio buttons
  • python tk sample
  • tkinter radiobutton example

No comments yet.

Leave a Comment

Switch to our mobile site