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
#9
What I want to do is to create a "Master Menu" by Tkinter in python. In that menu there would be like 2 or 3 buttons which will open new windows with different checklists etc. How can it be done? I was looking for solution for the last 2 hours and the only thing I got is creating new window with label. I don't know how to make python to open checklist in new Tkinter window. Can you help me?

I know that Tkinter.Toplevel() opens new window but how to "import" the previously created checklist into that window? Let's say I've got such list of things to do:

software = ['MS Office', 'Drivers', 'Chrome', 'ESET']
I did everything like you did in the code you gave me:


import Tkinter
from Tkinter import *
import tkMessageBox

top = Tkinter.Tk()

software = ['MS Office', 'Drivers', 'Chrome', 'ESET']

check_boxes_software = {item:IntVar() for item in software}

def software():
    if all(item.get() for item in check_boxes_software.values()):
        tkMessageBox.showinfo('Checklista Software', 'Wszystko gotowe!')
    else:
        tkMessageBox.showinfo('Checklista Software', 'Czegos brakuje!')

for item in software:
    C = Checkbutton(top, text = item, variable = check_boxes_software[item], anchor = W,  onvalue = 1, offvalue = 0, height=1, width=40)
    C.pack()

B1 = Tkinter.Button(top, text ='Sprawdz', command = software)

B1.pack()

top.mainloop()
How to make list above shows in another Tkinter window?
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,983 Oct-02-2019, 11:27 PM
Last Post: teflon
  [Tkinter] Checkboxes in different frames misbehave octoeder 3 4,585 Oct-03-2018, 09:12 AM
Last Post: jfong
  [WxPython] Setting interdependencies between checkboxes merlem 2 3,759 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