Python Forum
[Tkinter] Print if all checkboxes marked
Thread Rating:
  • 1 Vote(s) - 2 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Tkinter] Print if all checkboxes marked
#4
So I've got this code (it's not full cuz everything repeats):
from Tkinter import *
import tkMessageBox
import Tkinter

top = Tkinter.Tk()
top.wm_title("Checklist")

CheckVar1 = IntVar()
CheckVar2 = IntVar()

C1 = Checkbutton(top, text = "Underwear", variable = CheckVar1, anchor = W,  onvalue = 1, offvalue = 0, height=1, width = 40)
C2 = Checkbutton(top, text = "T-shirts", variable = CheckVar2, anchor = W, onvalue = 1, offvalue = 0, height=1, width = 40)

B1 = Tkinter.Button(top, text = "Sprawdz", command = confirm)

C1.pack()
C2.pack()

B1.pack()

top.mainloop()
What I want to do is when I press the button "Sprawdz" it will check whether all checkboxes are marked as checked. Whether they are  or not the message will appear in other gui window. How can I do that? I read something about those event handlers you mentioned above but I don't have any knowledge connected with IT and I couldn't find anything for "totally newbies". 

Thanks for response :)
Reply


Messages In This Thread
Print if all checkboxes marked - by Kaelmi - May-19-2017, 02:31 PM
RE: Print if all checkboxes marked - by buran - May-19-2017, 04:33 PM
RE: Print if all checkboxes marked - by nilamo - May-19-2017, 10:11 PM
RE: Print if all checkboxes marked - by Kaelmi - May-22-2017, 12:13 PM
RE: Print if all checkboxes marked - by buran - May-22-2017, 12:54 PM
RE: Print if all checkboxes marked - by Larz60+ - May-22-2017, 01:12 PM
RE: Print if all checkboxes marked - by Larz60+ - May-22-2017, 01:13 PM
RE: Print if all checkboxes marked - by Kaelmi - May-22-2017, 02:33 PM
RE: Print if all checkboxes marked - by Kaelmi - May-22-2017, 03:36 PM
RE: Print if all checkboxes marked - by Kaelmi - May-24-2017, 01:32 PM
RE: Print if all checkboxes marked - by buran - May-24-2017, 02:17 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  [Tkinter] Manipulating Checkboxes teflon 8 3,856 Oct-02-2019, 11:27 PM
Last Post: teflon
  [Tkinter] Checkboxes in different frames misbehave octoeder 3 4,509 Oct-03-2018, 09:12 AM
Last Post: jfong
  [WxPython] Setting interdependencies between checkboxes merlem 2 3,699 Feb-12-2017, 07:51 PM
Last Post: merlem

Forum Jump:

User Panel Messages

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