Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

CTkToolTip

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

CTkToolTip

Customtkinter Tooltip widget

  • 0.8
  • PyPI
  • Socket score

Maintainers
1

CTkToolTip

Small tooltip pop-up label for displaying details on customtkinter widgets.

example

Features

  • Display over any CTk widget
  • Configurable options
  • Transparency effect
  • Round corners
  • Can be used with CTkSlider to show the value
  • Dynamic offset
  • Add delays

Installation

pip install CTkToolTip

GitHub repo size

Example

Simple Usage:

CTkToolTip(widget, message="Your Message")

App Example:

import customtkinter
from CTkToolTip import *

def show_value(value):
    tooltip_1.configure(message=int(value))
    
def show_text():
    print(tooltip_2.get())

root = customtkinter.CTk()

slider = customtkinter.CTkSlider(root, from_=0, to=100, command=show_value)
slider.pack(fill="both", padx=20, pady=20)

tooltip_1 = CTkToolTip(slider, message="50")

button = customtkinter.CTkButton(root, command=show_text)
button.pack(fill="both", padx=20, pady=20)

tooltip_2 = CTkToolTip(button, delay=0.5, message="This is a CTkButton!")

root.mainloop()

Arguments

ParameterDescription
widgetbind the tooltip to the ctk widget
messageshow the message over the toolip
delayadd a small delay before showing the tooltip (default is 0.2)
followfollow the mouse cursor while hovering (default is True)
x_offsetchange the horizontal offset of the tooltip widget from mouse cursor
y_offsetchange the vertical offset of the tooltip widget from mouse cursor
alphachange the transparency effect of the tooltip (range: 0-1)
bg_colorchange the background color of the tooltip
corner_radiusroundness of the corners
border_widthadd a border around the tooltips (default is 0)
border_colorchange the color of the border width
paddingadd padx and pady inside the tooltip frame, tuple: (padx, pady)
text_colorchange the text color of tooltip
wraplengthconstrains the width of the tooltip, causing CTkToolTip, where required, to wrap the message at word boundaries.
fontlabel text font, tuple: (font_name, size)
justifychange the text display structure (left, right or center)
*Other Label ParametersAll other parameters for ctk label can be passed in ctktooltip

Methods

  • .configure(message, arguments...)

    configure the text and other parameters for the tooltip

  • .get()

    get the current text of tooltip

  • .hide()

    disables the tooltip from appearing

  • .show()

    enable the tooltip again

  • .is_disabled()

    check the tooltip state

Thats all about CTkToolTips, hope it will help in your project!

Keywords

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc