CustomTkinter
CustomTkinter copied to clipboard
Request : CTkTooltip & CTkScrollbar
CTkTooltip
CTkTooltip Features (suggested) :
- Tooltip with round corners
- Custom Font Support
- Customizable Color i.e. fg and bg
CTkScrollbar
CTkScrollbar Features (suggested) :
- Scrollbar with round corners
- Customizable Color i.e. fg and bg
yes I agree a tooltip widget would be nice maybe using combination of simple label widget and a triangle
I don't think its possible to create a custom tooltip because it must be separate window without any borders or headers and for round corners you would need a transparent window. Because tooltips can leak over the edge of a window.
But a scrollbar should be possible.
Well that can easily be solved using a pseudo root with directoverflow true, but I am not sure about the rounded corners
it can be done via Toplevel then make it transparent with wm_attribute -transparentcolor and adding ctk_frame in it. and a label.
and since canvas background is "white" by default transcolor
could be "white"
Except for the shadow part. Which I think could be done but is a little difficult
TinUI has created scrollbar. May provide a reference.
TinUI - GitHub | TinUI.py in function add_scorllbar
readme
right side is a scrollbar drawn in tkinter.Canvas.
tooltip also, but it is not nice enough.
@Smart-Space You provide a reference to GPL licensed code in a project which uses a CC license
CTkScrollbar is now available: https://github.com/TomSchimansky/CustomTkinter/wiki/CTkScrollbar (with version 4.5.0)
I've used for one project of mine ttk Tooltip: https://ttkwidgets.readthedocs.io/en/latest/examples/frames/Tooltip.html
@TomSchimansky does the CTkScrollbar also work with frame? Or just textboxes?
It works like a normal tkinter scrollbar, I don't now if a frame is scrollable in tkinter. You can us it for every widget that accepts a yscrollcommand/xscrollcommand.
Used the CTkScrollbar in my recent Project. It is a nice feature. I am still looking forward to CTkTooltip.
My Project: https://github.com/MSB-s-Projects/Astrologer-s-Stars-GUI
Screenshot:
I want to use tooltips in my app, but if I use the default ones, they will look terrible. I was so hoping for CTkTooltip to be released soon.
Regarding tooltip: In the meantime i use Hoovertip() from idlelib.tooltip module, and it looks ok
import tkinter
import customtkinter
from idlelib.tooltip import Hovertip
customtkinter.set_appearance_mode("System")
customtkinter.set_default_color_theme("blue")
app = customtkinter.CTk()
app.geometry("400x240")
def button_function():
print("button pressed")
button = customtkinter.CTkButton(master=app, text="Button with Tootip", command=button_function)
button.place(relx=0.5, rely=0.5, anchor=tkinter.CENTER)
buttonquittip=Hovertip(button,"""
i'm the button tooltip!
another line
""")
app.mainloop()
Regarding tooltip: In the meantime i use Hoovertip() from idlelib.tooltip module, and it looks ok
import tkinter import customtkinter from idlelib.tooltip import Hovertip customtkinter.set_appearance_mode("System") customtkinter.set_default_color_theme("blue") app = customtkinter.CTk() app.geometry("400x240") def button_function(): print("button pressed") button = customtkinter.CTkButton(master=app, text="Button with Tootip", command=button_function) button.place(relx=0.5, rely=0.5, anchor=tkinter.CENTER) buttonquittip=Hovertip(button,""" i'm the button tooltip! another line """) app.mainloop()
This definitely Looks Interesting. Thanks for this info. @bountycortez
i use Hoovertip() from idlelib.tooltip module, and it looks ok
Here my impression (Windows 10, Python 3.11)
The style of the tooltip doesn't fit well (and it's not a native Windows style either).
Also, the tooltip window is always placed below the mouse pointer on a fixed horizontal coordinate; this causes problems when the window is displayed at the left, right or bottom edge, as the tooltip may then be (partially) obscured.
Are these issues maybe only observable on Windows? @bountycortez @Manobal-Singh-Bagady
@Wolf-SO I have only tried the tooltip from tkinter tix library, which has the same issues as you mentioned. I use windows 11 only, so I don't know about the other operating systems. I think @bountycortez might know this.
I have recognized even more problems.After my mac switches (system driven) into Dark Mode, i can not read any tooltip text anymore.Am 31.01.2023 um 15:25 schrieb Wolf-SO @.***>:
i use Hoovertip() from idlelib.tooltip module, and it looks ok
Here my impression (Windows 10, Python 3.11)
The style of the tooltip doesn't fit well (and it's not a native Windows style either). Also, the tooltip window is always placed below the mouse pointer on a fixed horizontal coordinate; this causes problems when the window is displayed at the left, right or bottom edge, as the tooltip may then be (partially) obscured. Are these issues only observable on Windows?
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>
sam problem on my mac (macos monterey) and even more, see direct answer.
but interesting, how did you combine customtkinter and tix? didn't, work for me.
Am 31.01.2023 um 15:34 schrieb Manobal Singh Bagady @.***>:
@Wolf-SO https://github.com/Wolf-SO I have only tried the tooltip from tkinter tix library, which has the same issues as you mentioned. I use windows 11 only, so I don't know about the other operating systems. I think @bountycortez https://github.com/bountycortez might know this.
— Reply to this email directly, view it on GitHub https://github.com/TomSchimansky/CustomTkinter/issues/15#issuecomment-1410467650, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOIOI6MFGZM7N6G4YK2JSXTWVEPITANCNFSM5HOVI4AQ. You are receiving this because you were mentioned.
That's the issue, @bountycortez. That's why I was requesting CTkTooltip because tix is deprecated and doesn't work anymore.
Given what Tom said about the tooltip not being possible, maybe close this issue. (The scrollbar has been implemented).
There is a workaround for the tooltip at Akascape/CTkToolTip.
Maybe ask the author to create a PR to merge it with customtkinter
.
@TomSchimansky - Close as stale (old), not planned (50% not possible), or planned (50% implemented)?