Python Forum
Checkbutton writing selection to file
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Checkbutton writing selection to file
#1
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))
Reply
#2
ski_condition.get()
blakefindlay likes this post
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
Question [Tkinter] Checkbutton clicks events does not update visually. nicolaask 1 2,919 Dec-20-2020, 06:11 PM
Last Post: nicolaask
  [Tkinter] How to insert 'Checkbutton' to 'Treeview' and associate each item? water 2 12,996 Dec-19-2020, 05:24 PM
Last Post: water
  Find Checkbutton State PEGylated_User 3 3,048 Oct-23-2020, 12:43 AM
Last Post: Larz60+
  [tkinter] not getting checkbutton value when clicked OogieM 5 5,883 Sep-20-2020, 04:49 PM
Last Post: deanhystad
  [Tkinter] ttk.Checkbutton set on/off ifigazsi 5 10,305 Apr-04-2020, 07:34 PM
Last Post: deanhystad
  tkinter checkbutton if checked MC2020 2 5,925 Jan-21-2020, 07:08 PM
Last Post: joe_momma
  [Tkinter] Can't seem to get the current state of a checkbutton. p_hobbs 6 3,268 Nov-07-2019, 11:38 PM
Last Post: p_hobbs
  [Tkinter] Create a set of checkbutton widgets and refer to every one of them individually? Mariano 1 2,675 Apr-11-2019, 06:20 PM
Last Post: woooee
  doing something after been checked a checkbutton gray 1 4,236 Feb-18-2017, 05:11 PM
Last Post: Axel_Erfurt

Forum Jump:

User Panel Messages

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