2 Commits

Author SHA1 Message Date
31c0afe15b Bump to 4.6.3 2022-09-17 13:41:58 +02:00
dab93a6a5e Fixed variable configuring for CTkOptionMennu 2022-09-17 13:39:22 +02:00
5 changed files with 7 additions and 5 deletions

View File

@ -1,4 +1,4 @@
__version__ = "4.6.2"
__version__ = "4.6.3"
import os
import sys

View File

@ -226,7 +226,8 @@ class CTkOptionMenu(CTkBaseClass):
if self.variable is not None and self.variable != "":
self.variable_callback_name = self.variable.trace_add("write", self.variable_callback)
self.set(self.variable.get(), block_set_variable=True)
self.current_value = self.variable.get()
self.text_label.configure(text=self.current_value)
else:
self.variable = None

View File

@ -7,7 +7,7 @@ build-backend = "setuptools.build_meta"
github_url = "https://github.com/TomSchimansky/CustomTkinter"
[tool.tbump.version]
current = "4.6.2"
current = "4.6.3"
# Example of a semver regexp.
# Make sure this matches current_version before

View File

@ -1,6 +1,6 @@
[metadata]
name = customtkinter
version = 4.6.2
version = 4.6.3
description = Create modern looking GUIs with Python
long_description = CustomTkinter UI-Library\n\n[](https://github.com/TomSchimansky/CustomTkinter/blob/master/documentation_images/Windows_dark.png)\n\nMore Information: https://github.com/TomSchimansky/CustomTkinter
long_description_content_type = text/markdown

View File

@ -78,8 +78,9 @@ switch_2 = customtkinter.CTkSwitch(master=app, variable=s_var, textvariable=s_va
switch_2.pack(pady=20, padx=10)
optionmenu_var = tkinter.StringVar(value="test")
optionmenu_1 = customtkinter.CTkOptionMenu(master=app, variable=optionmenu_var, values=["Option 1", "Option 2", "Option 3"])
optionmenu_1 = customtkinter.CTkOptionMenu(master=app, variable=None, values=["Option 1", "Option 2", "Option 3"])
optionmenu_1.pack(pady=20, padx=10)
optionmenu_1.configure(variable=optionmenu_var)
combobox_1 = customtkinter.CTkComboBox(master=app, values=["Option 1", "Option 2", "Option 3"])
combobox_1.pack(pady=20, padx=10)
combobox_1.configure(variable=optionmenu_var)