CustomTkinter
CustomTkinter copied to clipboard
Issue with cursor changing on button
The cursor will not follow the cursor specified when hovered over a button with a function attached to it.
Lets assume we have a simple piece of code:
from customtkinter import *
def random_func():
print("uhh hi?")
root = CTk()
CTkButton(root, text="I cannot change the hover cursor!", command=random_func, cursor="arrow").pack()
root.mainloop()
Even when I set the cursor to arrow, the cursor is still the link-select when my mouse hovers over it. This only happens when a function is attached to it.
@Exec-Codes Add button.configure(cursor="arrow")
from customtkinter import *
def random_func():
print("uhh hi?")
root = CTk()
button = CTkButton(root, text="Now I can change the hover cursor!", command=random_func)
button.pack()
button.configure(cursor="arrow")
root.mainloop()
@Akascape
Thank you! This worked perfectly fine for me. (oh my gosh im so noob) However I tested my previous code but using the tkinter module and it worked without adding button.configure(cursor="arrow")... so is this sort of a bug for customtk?