gnikit / tkinter-tooltip

A ToolTip widget for tkinter
https://gnikit.github.io/tkinter-tooltip
MIT License
38 stars 3 forks source link

feat: add ability to show and hide the tooltip #105

Open melektron opened 1 month ago

melektron commented 1 month ago

This PR adds the ability to hide (aka. disable) the tooltip using a .hide() method. This simply withdraws immediately and prevents the tooltip from re-appearing. To enable the tooltip again, the .show() method can be used. This method will allow the tooltip to appear again. If it is already in the VISIBLE state, it will additionally immediately deiconify and update it.

@gnikit I needed this in one of my projects, not sure whether you think this fit in the public library. Also not sure what you think of .show() being similar to the internal ._show(). The wording may need some adjustment.