Skip to main content

Create a gradient frame for customtkinter.

Project description

Create a gradient frame for your customtkinter applications.

CTkGradient

CTkGradient is a fork of GradientFrame-Tkinter, it is a python module to create customtkinter frames with a gradient background color of your choice, you can choose between a vertical or horizontal gradient, among other options.

[!NOTE] This project is in alpha state, so you may encounter bugs through its use, which I would recommend reporting in issues. I'm thinking about a few features with gradients like buttons and other widgets, so stay tuned!

How to use it?

Install the module using pip (or pip3) by typing the next command on console...

pip install CTkGradient

Then import it and use it, here is an example:

# Import customtkinter and CTkGradient
import customtkinter as ctk
import CTkGradient as ctkg

# Initialize CustomTkinter
ctk.set_appearance_mode("dark")
ctk.set_default_color_theme("blue")

root = ctk.CTk()

# Create a GradientFrame with custom colors and direction
gradient_frame = ctkg.GradientFrame(
    master = root,
    colors = ("#ec0075", "#ffd366"),
    direction = "vertical",
    corner_radius = 10,
    height = 600,
    width = 800
)

gradient_frame.pack(fill = "both", expand = True)

root.mainloop()

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ctkgradient-0.3.2.tar.gz (5.5 kB view hashes)

Uploaded Source

Built Distribution

CTkGradient-0.3.2-py3-none-any.whl (6.1 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page