mirror of
https://github.com/TomSchimansky/CustomTkinter.git
synced 2023-08-10 21:13:13 +03:00
small fixes for CTkComboBox
This commit is contained in:
@ -1,4 +1,5 @@
|
||||
import tkinter
|
||||
import tkinter.ttk as ttk
|
||||
import customtkinter
|
||||
|
||||
app = customtkinter.CTk()
|
||||
@ -22,4 +23,10 @@ optionmenu_tk.pack(pady=10, padx=10)
|
||||
optionmenu_1 = customtkinter.CTkOptionMenu(app, variable=variable, values=countries, command=select_callback)
|
||||
optionmenu_1.pack(pady=10, padx=10)
|
||||
|
||||
combobox_tk = ttk.Combobox(app, values=countries)
|
||||
combobox_tk.pack(pady=10, padx=10)
|
||||
|
||||
combobox_1 = customtkinter.CTkComboBox(app, variable=variable, values=countries, command=select_callback)
|
||||
combobox_1.pack(pady=10, padx=10)
|
||||
|
||||
app.mainloop()
|
@ -73,8 +73,8 @@ switch_1.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.pack(pady=20, padx=10)
|
||||
optionmenu_2 = customtkinter.CTkOptionMenu(master=app, values=["Option 1", "Option 2", "Option 3"])
|
||||
optionmenu_2.pack(pady=20, padx=10)
|
||||
optionmenu_2.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)
|
||||
|
||||
app.mainloop()
|
||||
|
@ -48,5 +48,10 @@ optionmenu_1.pack(pady=10, padx=10)
|
||||
button_6 = customtkinter.CTkButton(master=app, text="Disable/Enable optionmenu_1", command=lambda: change_state(optionmenu_1))
|
||||
button_6.pack(padx=20, pady=(10, 20))
|
||||
|
||||
combobox_1 = customtkinter.CTkComboBox(app, values=["test 1", "test 2"])
|
||||
combobox_1.pack(pady=10, padx=10)
|
||||
button_7 = customtkinter.CTkButton(master=app, text="Disable/Enable combobox_1", command=lambda: change_state(combobox_1))
|
||||
button_7.pack(padx=20, pady=(10, 20))
|
||||
|
||||
|
||||
app.mainloop()
|
||||
|
Reference in New Issue
Block a user