Bottom Page

Thread Rating:
  • 2 Vote(s) - 3.5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 [Tkinter] Completing Action when CheckBox is Checked
text1 = Checkbutton (root, text = "Text") = 100, y = 290)

if text1.isChecked():

This is the code I am trying to run. I want my code to go into the if statement whenever the checkbox is checked, if it gets unchecked and then checked again, I want it to go back into the if statement. Right now it is not doing anything. How can I get it to work?

Thank you! Huh
import tkinter as tk

class App:
    def __init__(self):
        self.root = tk.Tk()
        self.frame = tk.Frame(self.root)
        self.check_var = tk.IntVar()
        self.check_button = tk.Checkbutton(self.frame,


    def check_status(self):

app = App()
99 percent of computer problems exists between chair and keyboard.
Thank you so much! It works perfectly.

Top Page

Possibly Related Threads...
Thread Author Replies Views Last Post
  How to get the value of a checkbox scratchmyhead 4 225 May-14-2020, 02:56 PM
Last Post: scratchmyhead
  Tkinter checkbox value scratchmyhead 5 243 May-09-2020, 11:44 PM
Last Post: menator01
  TreeviewWith CheckBox issac_n 1 2,457 Mar-08-2020, 06:51 AM
Last Post: shamnadinn
  tkinter checkbutton if checked MC2020 2 472 Jan-21-2020, 07:08 PM
Last Post: joe_momma
  Tkinter Checkbox niro_one 1 315 Jan-13-2020, 11:31 AM
Last Post: joe_momma
  Tkinter Buttons action d3fi 1 332 Nov-20-2019, 09:16 PM
Last Post: Larz60+
  [Tkinter] Unable to create checkbox and select at run time tej7gandhi 5 856 May-05-2019, 04:57 PM
Last Post: tej7gandhi
  [PyQt] PyQt4 handle dynamic checkbox click littleGreenDude 1 2,635 Dec-27-2018, 09:17 PM
Last Post: littleGreenDude
  Displaying error in QTableview and with Checkbox in Column under macOsX nieselfriem 1 2,729 Mar-19-2017, 10:43 PM
Last Post: nilamo
  doing something after been checked a checkbutton gray 1 1,813 Feb-18-2017, 05:11 PM
Last Post: Axel_Erfurt

Forum Jump:

Users browsing this thread: 1 Guest(s)