Python Forum
Checkbutton writing selection to file - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: GUI (https://python-forum.io/forum-10.html)
+--- Thread: Checkbutton writing selection to file (/thread-32209.html)



Checkbutton writing selection to file - blakefindlay - Jan-28-2021

I have 3 checkbuttons that are used to state the condition of ski poles, ski boots, and skis. My issue is that it is only outputting 'PY_VAR7'. Just wondering how to tackle this

ski_number = Entry(root)
ski_number.grid(row=7, column=5)
ski_number.insert(0, "S-")
ski_number.config({"background": "#EDEAD7"})

ski_condition = BooleanVar()
Checkbutton(root, variable=ski_condition, onvalue=True, offvalue=False).grid(row=7, column=6)

ski_number_label = Label(root, text="Ski Number: ", bg='lightgrey')
ski_number_label.grid(row=7, column=4)
    
renter.write("\n")
renter.write("Ski Condition: " + str(ski_condition))



RE: Checkbutton writing selection to file - deanhystad - Jan-28-2021

ski_condition.get()