Python Tkinter RadioButton Widget

44

from tkinter import *
root = Tk()
var = IntVar()
Radiobutton(root, text='Python', variable=var, value=1).pack(anchor=W)
Radiobutton(root, text='Tkinter', variable=var, value=2).pack(anchor=W)
Radiobutton(root, text='WordPress', variable=var, value=3).pack(anchor=W)
Radiobutton(root, text='Gutenberg', variable=var, value=4).pack(anchor=W)
mainloop()

Comments

Submit
0 Comments