# CTkScrollableDropdownPP
[](https://pepy.tech/projects/ctkscrollabledropdownpp)
**CTkScrollableDropdownPP** is an enhanced dropdown widget for CustomTkinter featuring pagination, live search, and grouping support.
> Based on the original [CTkScrollableDropdown](https://github.com/Akascape/CTkScrollableDropdown) project.
## Features
* Pagination for large lists
* Real-time filtering
* Grouped items (using regex or labels)
* Autocomplete on typing
* Fully customizable appearance
## Installation
```bash
pip install ctkscrollabledropdownpp
```
## Example
```python
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)
root.mainloop()
```
Raw data
{
"_id": null,
"home_page": null,
"name": "CTkScrollableDropdownPP",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": "customtkinter, dropdown, pagination, search, groups",
"author": "PLauncher-Team, Akash Bora",
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/ea/91/0df24990fe49ce9649b881e8e171afd7d2b033a0eff97037b9190118a4fc/ctkscrollabledropdownpp-2.1.3.tar.gz",
"platform": null,
"description": "# CTkScrollableDropdownPP\r\n\r\n[](https://pepy.tech/projects/ctkscrollabledropdownpp)\r\n\r\n**CTkScrollableDropdownPP** is an enhanced dropdown widget for CustomTkinter featuring pagination, live search, and grouping support.\r\n\r\n> Based on the original [CTkScrollableDropdown](https://github.com/Akascape/CTkScrollableDropdown) project.\r\n\r\n## Features\r\n\r\n* Pagination for large lists\r\n* Real-time filtering\r\n* Grouped items (using regex or labels)\r\n* Autocomplete on typing\r\n* Fully customizable appearance\r\n\r\n## Installation\r\n\r\n```bash\r\npip install ctkscrollabledropdownpp\r\n```\r\n\r\n## Example\r\n\r\n```python\r\nimport customtkinter\r\nfrom PIL import Image, ImageDraw\r\nfrom CTkScrollableDropdownPP import CTkScrollableDropdown\r\nimport io\r\n\r\n\r\ndef create_color_image(color, width=20, height=20):\r\n \"\"\"Create an image of the specified color\"\"\"\r\n img = Image.new('RGBA', (width, height), (0, 0, 0, 0))\r\n draw = ImageDraw.Draw(img)\r\n draw.rectangle((0, 0, width - 1, height - 1), fill=color)\r\n img_bytes = io.BytesIO()\r\n img.save(img_bytes, format='PNG')\r\n img_bytes.seek(0)\r\n return customtkinter.CTkImage(Image.open(img_bytes), size=(width, height))\r\n\r\n\r\ndef create_number_image(number, width=20, height=20):\r\n \"\"\"Create an image with a digit\"\"\"\r\n img = Image.new('RGBA', (width, height), (0, 0, 0, 0))\r\n draw = ImageDraw.Draw(img)\r\n draw.rectangle((0, 0, width - 1, height - 1), fill=\"#FFFFFF\")\r\n draw.text((width // 2, height // 2), str(number), fill=\"#000000\", anchor=\"mm\")\r\n img_bytes = io.BytesIO()\r\n img.save(img_bytes, format='PNG')\r\n img_bytes.seek(0)\r\n return customtkinter.CTkImage(Image.open(img_bytes), size=(width, height))\r\n\r\n\r\n# Create main window\r\nroot = customtkinter.CTk()\r\nroot.geometry(\"500x400\")\r\n\r\n# Create CTkComboBox\r\ncombobox = customtkinter.CTkComboBox(root, width=250)\r\ncombobox.pack(pady=50)\r\n\r\n# Data for dropdown list\r\ncolors = {\r\n \"Red\": \"#FF0000\",\r\n \"Green\": \"#00FF00\",\r\n \"Blue\": \"#0000FF\",\r\n \"Yellow\": \"#FFFF00\",\r\n \"Orange\": \"#FFA500\",\r\n \"Purple\": \"#800080\",\r\n \"Pink\": \"#FFC0CB\",\r\n \"Brown\": \"#A52A2A\",\r\n \"Black\": \"#000000\",\r\n \"White\": \"#FFFFFF\"\r\n}\r\n\r\nnumbers = [str(i) for i in range(10)] # Digits from 0 to 9\r\n\r\n# Create lists of values and images\r\ncolor_values = list(colors.keys())\r\ncolor_images = [create_color_image(color_code) for color_code in colors.values()]\r\n\r\nnumber_values = numbers\r\nnumber_images = [create_number_image(num) for num in numbers]\r\n\r\n# Combine all values and images\r\nall_values = color_values + number_values\r\nall_images = color_images + number_images\r\n\r\n# Groups for sorting\r\ngroups = [\r\n [\"Numbers\", \"^[0-9]$\"],\r\n [\"Colors\", \"__OTHERS__\"]\r\n]\r\n\r\n# Create dropdown list\r\ndropdown = CTkScrollableDropdown(attach=combobox, button_color=\"#2b2b2b\", height=200, width=300, fg_color=\"#333333\",\r\n values=all_values, command=lambda value: print(f\"Selected: {value}\"),\r\n image_values=all_images, text_color=\"#ffffff\", hover_color=\"#3a3a3a\",\r\n font=(\"Arial\", 12), groups=groups, items_per_page=10)\r\n\r\nroot.mainloop()\r\n```\r\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Enhanced CTkScrollableDropdown with pagination, search and groups support",
"version": "2.1.3",
"project_urls": {
"Homepage": "https://github.com/PLauncher-Team/CTkScrollableDropdownPP",
"Original": "https://github.com/Akascape/CTkScrollableDropdown"
},
"split_keywords": [
"customtkinter",
" dropdown",
" pagination",
" search",
" groups"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "36c939fd280e2ad3ec1056d99ef66c55c5b5b2332dee44fc2e8bc99c9dd16f77",
"md5": "90c62210a6b8066658c93951d6b3198c",
"sha256": "bbeb01e7c48d8f5d39e4a6f7e0b758da01f5b9242673fa92438690a46bce33b3"
},
"downloads": -1,
"filename": "ctkscrollabledropdownpp-2.1.3-py3-none-any.whl",
"has_sig": false,
"md5_digest": "90c62210a6b8066658c93951d6b3198c",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 9613,
"upload_time": "2025-08-22T12:52:51",
"upload_time_iso_8601": "2025-08-22T12:52:51.389972Z",
"url": "https://files.pythonhosted.org/packages/36/c9/39fd280e2ad3ec1056d99ef66c55c5b5b2332dee44fc2e8bc99c9dd16f77/ctkscrollabledropdownpp-2.1.3-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "ea910df24990fe49ce9649b881e8e171afd7d2b033a0eff97037b9190118a4fc",
"md5": "b99250f83b3930e3d4a3ece5ac6d1784",
"sha256": "9618f92afe86860f6c36f38ac40566375fa3dfad3ded11b8ae2821b44f14f44e"
},
"downloads": -1,
"filename": "ctkscrollabledropdownpp-2.1.3.tar.gz",
"has_sig": false,
"md5_digest": "b99250f83b3930e3d4a3ece5ac6d1784",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 9295,
"upload_time": "2025-08-22T12:52:52",
"upload_time_iso_8601": "2025-08-22T12:52:52.885306Z",
"url": "https://files.pythonhosted.org/packages/ea/91/0df24990fe49ce9649b881e8e171afd7d2b033a0eff97037b9190118a4fc/ctkscrollabledropdownpp-2.1.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-08-22 12:52:52",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "PLauncher-Team",
"github_project": "CTkScrollableDropdownPP",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "ctkscrollabledropdownpp"
}