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

if text1.isChecked():
print("Hi")

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
Reply


Messages In This Thread
Completing Action when CheckBox is Checked - by Anysja - Aug-02-2018, 03:48 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  [closed] "checked" variable (attribute?) origin? paul18fr 4 542 Mar-05-2024, 04:20 PM
Last Post: deanhystad
  [PyQt] choose checkbox devilonline 1 1,294 Feb-17-2023, 01:23 PM
Last Post: Axel_Erfurt
  [Tkinter] Dynamic checkbox treeview issue OogieM 8 4,968 Mar-20-2022, 02:10 PM
Last Post: OogieM
  tkinter change the text of the checkbox zazas321 1 3,847 Sep-17-2021, 06:19 AM
Last Post: zazas321
  How to get the value of a checkbox scratchmyhead 4 3,056 May-14-2020, 02:56 PM
Last Post: scratchmyhead
  Tkinter checkbox value scratchmyhead 5 3,699 May-09-2020, 11:44 PM
Last Post: menator01
  TreeviewWith CheckBox issac_n 1 7,764 Mar-08-2020, 06:51 AM
Last Post: shamnadinn
  tkinter checkbutton if checked MC2020 2 6,009 Jan-21-2020, 07:08 PM
Last Post: joe_momma
  Tkinter Checkbox niro_one 1 2,358 Jan-13-2020, 11:31 AM
Last Post: joe_momma
  Tkinter Buttons action d3fi 1 2,011 Nov-20-2019, 09:16 PM
Last Post: Larz60+

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020