Questions tagged [tkinter.checkbutton]

69 questions
60
votes
3 answers

Getting Checkbutton state

How do I get the 'state' of a Tkinter Checkbutton? By 'state' I mean get whether or not it has a check mark in it or not.
rectangletangle
  • 50,393
  • 94
  • 205
  • 275
6
votes
2 answers

TK python checkbutton RTL

I have a checkbutton: from tkinter import * master = Tk() Checkbutton(master, text="Here...").grid(row=0, sticky=W) mainloop() Which looks like this: I tried to move the checkbutton to the other side (to support RTL languages), so it'll be…
zvi
  • 3,677
  • 2
  • 30
  • 48
4
votes
2 answers

Why are these Python tkinter checkbuttons linked?

I'm currently trying to create a GUI to compare files between two different folders and have a rudimentary framework that I'm trying to build off of right now. I have three frames on the left, right, and bottom of the window with two checkbuttons…
3
votes
1 answer

Generate checkbutton based on radiobutton selection

I am trying to generate checkbuttons based on radiobutton selection using Tkinter in Python. Here are the dictionaries; the keys should show as checkbuttons: PERISHABLE_OPTIONS = {'Vegetables': 0, 'Fruits': 0, 'Bread': 0, 'Dairy': 0, 'Meat': 0,…
Ashzabin Wadud
  • 329
  • 3
  • 7
  • 15
2
votes
1 answer

How to enable button if user clicked to the checkbutton

This is my code def register_user(): Button(win, text="Sign Up", command=register_file, state=DISABLED).place(x=20, y=290) var = IntVar() Checkbutton(win, variable=var,).place(x=15, y=249) How can I do this
2
votes
0 answers

Scrollbar tkinter checkbutton

I want to display checkbutton with a scrollbar. demo I would like both buttons to be always visible (that the scrollbar is only on the checkbutton) Here is my code: def selectColumns(self, data): new_window = Toplevel(self.master,…
Eolynas
  • 43
  • 4
1
vote
1 answer

How to access 'x' and 'y' values in 'place' attribute of TKinter Checkbutton using Python?

What is the correct syntax for accessing the 'x' and 'y' values in the 'place' attribute of a TKinter Checkbutton? I'm not finding anything to help in the docs and my attempts to guess the syntax haven't worked. from tkinter import * window=Tk() v1…
hermitjimx
  • 61
  • 10
1
vote
1 answer

Python Tkinter for loop checkbuttons not working as intended

having trouble with tkinter and making checkbuttons through a for loop. i need to create a dynamic amount of buttons based on a previously created list. With this code, all of the buttons get ticked and unticked at the same time when i click one of…
Zefile
  • 13
  • 3
1
vote
1 answer

deselect the checkbox using the listbox item in tkinter python and print the current item of listbox

I have two checkbox Pass and FAIL I am parsing the csv for column1 and adding the two checkbox . X = 100 Y = 71 for item in column1[key]: if item != '': listbox.insert('end', item) …
Piu
  • 19
  • 5
1
vote
3 answers

How to create a proper CheckButton in Tkinter?

Im trying to create a CheckButton in tkinter based on the items I have in my equipment list. The CheckButton has been created but not all the items that are in equipment are visible in the app. Is it because my items are to large? This is my…
TangerCity
  • 775
  • 2
  • 7
  • 13
1
vote
1 answer

How do I create multiple checkboxes from txt file in python tkinter

I'd like to make checkbuttons from the lines in my txt file via path, and then want to get the value of the checkbuttons. In the 2021-03-27.txt 1. Python 2. C++ and then, if 1.Python is checked, I need to append 1. Python complete in…
1
vote
1 answer

Tkinter run multiple functions by checking the Checkbuttons

I'm building a script to make a GUI window presenting some functions I made before. I would like to tick the buttons which I want to run the functions. So far I can run a function by checking the checkbox. But only one. button1 =…
Dong-gyun Kim
  • 411
  • 5
  • 23
1
vote
1 answer

how to create new checkbuttons with a mouse click in python

I want to create a program where the user can create different buttons with the click of the mouse, those buttons should be independent. With this logic, the user can create a checkbutton that works, change from green to red when is selected. My…
1
vote
3 answers

ttk checkbutton is not deselected by default

Please kick here to see the current output and expected output I have a simple python program where i want to deselect the checkbutton by default. I want to see it the same way as when a user unchecks a tick box. Please let me know how to achieve…
codehunt
  • 43
  • 4
1
vote
2 answers

AttributeError: 'Checkbutton' object has no attribute 'deselect'

I'm having a problem to load the checkbox state from a text file that contain '0' and '1'. inside "test.txt" file : 1 0 1 0 This is what I'm expecting the outcome to be as '1' represent checked box and '0' represent unchecked box Below is the…
zwair
  • 25
  • 1
  • 6
1
2 3 4 5