Open bobwatcherx opened 1 year ago
What platform are you using, Linux?
Yes , Linux mint
Hello @bobwatcherx. I'm on Linux Mint Cinnamon 21.1, and that runs fine for me.
Unless you have manually upgraded Python, I am guessing that you are also on Linux Mint 21.1 also. Anyhow, here is what I get:
When I enter a number, and click on the OK button, I get the entered number output to the console:
By the way, there is no need for the import tkinter
.
why is it still not working on me and i using Awesome WM in Linux Min
root@miop-HP-Convertible-x360-11-ab1XX:/home/miop/belajar/fletsub2# pip list | grep customtkinter
customtkinter 5.1.3
root@miop-HP-Convertible-x360-11-ab1XX:/home/miop/belajar/fletsub2# python3 --version
Python 3.10.6
i remove code import tkinter
full code
import customtkinter
customtkinter.set_appearance_mode("System")
customtkinter.set_default_color_theme("green")
app = customtkinter.CTk()
app.geometry("400x300")
def button_click_event():
dialog = customtkinter.CTkInputDialog(text="Type in a number:", title="Test")
print("Number:", dialog.get_input())
button = customtkinter.CTkButton(app, text="Open Dialog", command=button_click_event)
button.pack(padx=20, pady=20)
app.mainloop()
you can try using Awesome WM . i get Errror
you can try it with normal tkinter to verify its a CustomTkinter issue
The same here
my code
error root@miop-HP-Convertible-x360-11-ab1XX:/home/miop/belajar/custometkinter# python3 main.py Exception in Tkinter callback Traceback (most recent call last): File "/usr/lib/python3.10/tkinter/init.py", line 1921, in call return self.func(*args) File "/usr/local/lib/python3.10/dist-packages/customtkinter/windows/widgets/ctk_button.py", line 553, in _clicked self._command() File "/home/miop/belajar/custometkinter/main.py", line 12, in button_click_event dialog = customtkinter.CTkInputDialog(text="Type in a number:", title="Test") File "/usr/local/lib/python3.10/dist-packages/customtkinter/windows/ctk_input_dialog.py", line 50, in init self.grab_set() # make other windows not clickable File "/usr/lib/python3.10/tkinter/init.py", line 941, in grab_set self.tk.call('grab', 'set', self._w) _tkinter.TclError: grab failed: window not viewable