[Tutor] Tkinter checkbutton
Phil
phillor9 at gmail.com
Wed Feb 23 22:41:04 EST 2022
Out of curiosity, I'm wondering if the select area (the area where the
tick is displayed when the button is selected) can be set when the
checkbutton is selected? According to the documentation the default
colour is red but in my case it's white and doesn't change colour when
the checkbutton is selected.
This is from the tk docs. "selectcolor The color of the checkbutton when
it is set. By default, it is red."
This is one of my checkbuttons:
self.red_check_button = ttk.Checkbutton(self.frame,
text='Red LED',
selectcolor='red',
variable=self.red_value)
This causes the select area to be red whether the checkbutton is
selected or not and it's the same for a tk or ttk checkbutton. The way
the checkbutton behaves could possibly depend on the OS used.
--
Regards,
Phil
More information about the Tutor
mailing list