Tkinter Create Checkbuttonin Frame
Creates a checkbox in the frame containing the raised attribute.
Tkinter Create Checkbutton in Frame Example#1
Create a frame with the raised attribute, and create labels and Checkbutton within this frame.
from tkinter import *
root = Tk()
root.title("apidemos.com")
fm = Frame(width=150,height=80,relief=RAISED,borderwidth=5) # Create Frame
lab = Label(fm,text="Please select more common programming languages") # Create Label
lab.pack()
python = Checkbutton(fm,text="Python") # Create Python Checkbutton
python.pack(anchor=W)
java = Checkbutton(fm,text="Java") # Create Java Checkbutton
java.pack(anchor=W)
ruby = Checkbutton(fm,text="Ruby") # Create Ruby Checkbutton
ruby.pack(anchor=W)
fm.pack(padx=10,pady=10) # pack Frame
root.mainloop()
Output: