fixed bug when button click destroys button itself (version 1.8)

This commit is contained in:
Tom Schimansky
2022-01-02 12:14:46 +01:00
parent ec97ef16b5
commit 53c0b00bab
4 changed files with 8 additions and 46 deletions

View File

@ -1,4 +1,4 @@
__version__ = "1.7"
__version__ = "1.8"
from .customtkinter_button import CTkButton
from .customtkinter_slider import CTkSlider

View File

@ -501,8 +501,8 @@ class CTkButton(tkinter.Frame):
def clicked(self, event=0):
if self.function is not None:
if self.state is not tkinter.DISABLED:
self.function()
self.on_leave()
self.function()
def set_appearance_mode(self, mode_string):
if mode_string.lower() == "dark":