{"id":18717158,"url":"https://github.com/akascape/ctklistbox","last_synced_at":"2025-04-05T16:06:23.790Z","repository":{"id":179142199,"uuid":"656639482","full_name":"Akascape/CTkListbox","owner":"Akascape","description":"A simple listbox for customtkinter (extenstion/add-on)","archived":false,"fork":false,"pushed_at":"2024-08-02T14:42:41.000Z","size":78,"stargazers_count":161,"open_issues_count":17,"forks_count":14,"subscribers_count":4,"default_branch":"main","last_synced_at":"2024-10-31T09:04:51.168Z","etag":null,"topics":["customtkinter","customtkinter-widgets","listbox","tkinter","tkinter-gui","tkinter-widgets"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Akascape.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"ko_fi":"akascape"}},"created_at":"2023-06-21T10:42:33.000Z","updated_at":"2024-10-30T12:54:07.000Z","dependencies_parsed_at":null,"dependency_job_id":"28db7cf1-3504-4cf1-9ed2-e4c75d939e95","html_url":"https://github.com/Akascape/CTkListbox","commit_stats":null,"previous_names":["akascape/ctklistbox"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Akascape%2FCTkListbox","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Akascape%2FCTkListbox/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Akascape%2FCTkListbox/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Akascape%2FCTkListbox/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Akascape","download_url":"https://codeload.github.com/Akascape/CTkListbox/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247361686,"owners_count":20926643,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["customtkinter","customtkinter-widgets","listbox","tkinter","tkinter-gui","tkinter-widgets"],"created_at":"2024-11-07T13:15:08.883Z","updated_at":"2025-04-05T16:06:23.767Z","avatar_url":"https://github.com/Akascape.png","language":"Python","funding_links":["https://ko-fi.com/akascape"],"categories":[],"sub_categories":[],"readme":"# CTkListbox\nThis is a **listbox widget** for customtkinter, works just like the tkinter listbox.\n\n![Screenshot](https://github.com/Akascape/CTkListbox/assets/89206401/256c135f-3d6c-4daa-87a5-b4572a2c905f)\n\n## Installation\n```\npip install CTkListbox\n```\n### [\u003cimg alt=\"GitHub repo size\" src=\"https://img.shields.io/github/repo-size/Akascape/CTkListbox?\u0026color=white\u0026label=Download%20Source%20Code\u0026logo=Python\u0026logoColor=yellow\u0026style=for-the-badge\"  width=\"400\"\u003e](https://github.com/Akascape/CTkListbox/archive/refs/heads/main.zip)\n\n## Usage\n```python\nimport customtkinter\nfrom CTkListbox import *\n\ndef show_value(selected_option):\n    print(selected_option)\n    \nroot = customtkinter.CTk()\n\nlistbox = CTkListbox(root, command=show_value)\nlistbox.pack(fill=\"both\", expand=True, padx=10, pady=10)\n\nlistbox.insert(0, \"Option 0\")\nlistbox.insert(1, \"Option 1\")\nlistbox.insert(2, \"Option 2\")\nlistbox.insert(3, \"Option 3\")\nlistbox.insert(4, \"Option 4\")\nlistbox.insert(5, \"Option 5\")\nlistbox.insert(6, \"Option 6\")\nlistbox.insert(7, \"Option 7\")\nlistbox.insert(\"END\", \"Option 8\")\n\nroot.mainloop()\n```\n## Arguments\n| Parameter | Description |\n|-----------| ------------|\n| **master** | parent widget  |\n| width | **optional**, set width of the listbox |\n| height | **optional**, set height of the listbox |\n| fg_color | foreground color of the listbox |\n| border_color | border color of the listbox frame |\n| border_width | width of the border frame |\n| text_color | set the color of the option text |\n| hover | Enable/Disable hover effect (bool) |\n| hover_color | set hover color of the options |\n| button_color | set color of unselected buttons |\n| highlight_color | set the selected color of the option |\n| font | set font of the option text, must be a tuple or CTkFont |\n| wraplength | change the number of letter per option line |\n| justify | change the text anchor; left, right or center |\n| command | calls a command when a option is selected |\n| multiple_selection | select multiple options in the listbox, `default=False`|\n| listvariable | use a tkinter variable to change the listbox content |\n| *other_parameters | _all other parameters of ctk_scrollable frame can be passed_ |\n\n## Methods\n- **.insert(index, option)**\n   add new option to the listbox\n- **.get()**\n   get the selected option(s)\n- **.delete(index)**\n   delete any option from the listbox. `.delete(\"all\")` deletes all options\n- **.size()**\n   get the size of the listbox\n- **.activate(index)**\n  activate any option\n- **.deactivate(index)**\n  deactivate any option\n- **.curselection()**\n  returns indexes of selected options\n- **.configure()**\n   change some parameters for the listbox.\n- **.see(index)**\n  move the listbox scrollbar to the index place\n- **.move_up(index)/.move_down(index)**\n   Reorder options in the listbox\n  \n### Thanks for visiting! Hope it will help :)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fakascape%2Fctklistbox","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fakascape%2Fctklistbox","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fakascape%2Fctklistbox/lists"}