Add radio buttons widgets in Python.
from tkinter import *
from tkinter.ttk import *
window = Tk()
window.title("Welcome to Coding Block!")
window.geometry('350x200')
radio1 = Radiobutton(window,text='First', value=1)
radio2 = Radiobutton(window,text='Second', value=2)
radio3 = Radiobutton(window,text='Third', value=3)
radio1.grid(column=0, row=0)
radio2.grid(column=1, row=0)
radio3.grid(column=2, row=0)
window.mainloop()
OUTPUT
Add radio buttons widgets in Python. |
No comments:
Post a Comment
Please do not any spam link in Comment Box