Skip to main content

CTkScrollableDropdownPP

PyPI Downloads

CTkScrollableDropdownPP is an enhanced dropdown widget for CustomTkinter featuring pagination, live search, grouping support, and multiple selection.

Based on the original CTkScrollableDropdown project.

Features

  • Pagination for large lists
  • Real-time filtering
  • Grouped items (using regex or labels)
  • Autocomplete on typing
  • Multiple selection support
  • Fully customizable appearance

Installation

pip install ctkscrollabledropdownpp

Example

import customtkinter
from PIL import Image, ImageDraw
from CTkScrollableDropdownPP import CTkScrollableDropdown
import io


def create_color_image(color, width=20, height=20):
    """Create an image of the specified color"""
    img = Image.new('RGBA', (width, height), (0, 0, 0, 0))
    draw = ImageDraw.Draw(img)
    draw.rectangle((0, 0, width - 1, height - 1), fill=color)
    img_bytes = io.BytesIO()
    img.save(img_bytes, format='PNG')
    img_bytes.seek(0)
    return customtkinter.CTkImage(Image.open(img_bytes), size=(width, height))


def create_number_image(number, width=20, height=20):
    """Create an image with a digit"""
    img = Image.new('RGBA', (width, height), (0, 0, 0, 0))
    draw = ImageDraw.Draw(img)
    draw.rectangle((0, 0, width - 1, height - 1), fill="#FFFFFF")
    draw.text((width // 2, height // 2), str(number), fill="#000000", anchor="mm")
    img_bytes = io.BytesIO()
    img.save(img_bytes, format='PNG')
    img_bytes.seek(0)
    return customtkinter.CTkImage(Image.open(img_bytes), size=(width, height))


# Create main window
root = customtkinter.CTk()
root.geometry("500x400")

# Create CTkComboBox
combobox = customtkinter.CTkComboBox(root, width=250)
combobox.pack(pady=50)

# Data for dropdown list
colors = {
    "Red": "#FF0000",
    "Green": "#00FF00",
    "Blue": "#0000FF",
    "Yellow": "#FFFF00",
    "Orange": "#FFA500",
    "Purple": "#800080",
    "Pink": "#FFC0CB",
    "Brown": "#A52A2A",
    "Black": "#000000",
    "White": "#FFFFFF"
}

numbers = [str(i) for i in range(10)]  # Digits from 0 to 9

# Create lists of values and images
color_values = list(colors.keys())
color_images = [create_color_image(color_code) for color_code in colors.values()]

number_values = numbers
number_images = [create_number_image(num) for num in numbers]

# Combine all values and images
all_values = color_values + number_values
all_images = color_images + number_images

# Groups for sorting
groups = [
    ["Numbers", "^[0-9]$"],
    ["Colors", "__OTHERS__"]
]

# Create dropdown list
dropdown = CTkScrollableDropdown(attach=combobox, button_color="#2b2b2b", height=200, width=300, fg_color="#333333",
                                 values=all_values, command=lambda value: print(f"Selected: {value}"),
                                 image_values=all_images, text_color="#ffffff", hover_color="#3a3a3a",
                                 font=("Arial", 12), groups=groups, items_per_page=10, multiple=True)

root.mainloop()

Metadata

Release files for CTkScrollableDropdownPP 2.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for CTkScrollableDropdownPP 2.5
File Size Uploaded Provenance Actions
ctkscrollabledropdownpp-2.5.tar.gz 9.7 kB Without provenance Details for ctkscrollabledropdownpp-2.5.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for CTkScrollableDropdownPP 2.5
File Interpreter ABI Platform Actions
ctkscrollabledropdownpp-2.5-py3-none-any.whl Python 3 none any Details for ctkscrollabledropdownpp-2.5-py3-none-any.whl

Total release size: 19.7 kB

Release files / ctkscrollabledropdownpp-2.5.tar.gz

Download URL ctkscrollabledropdownpp-2.5.tar.gz
Size 9.7 kB
Tags Source
SHA-256 checksum
How to use checksums
0e948ad8f91a43d07573967916f1ddbcb0c0a2219d61c67fc0c6911e8d45d90a
BLAKE2b-256 checksum
How to use checksums
885120d87336bf0dc2d7a657c2067780ee366350b57976cefd3ae40af4ec8412
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.14

Release files / ctkscrollabledropdownpp-2.5-py3-none-any.whl

Download URL ctkscrollabledropdownpp-2.5-py3-none-any.whl
Size 10.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2e1e8ef64fe9ae6cdb555da20a4937343b3d3b647e05b799c2e941e198346dee
BLAKE2b-256 checksum
How to use checksums
af17287f63ae988052dd70f4435e6267de66370692d1d76cef5f5d372dc4466e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.14

Security for CTkScrollableDropdownPP 2.5

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page