Insert a Combobox into your GUI that allows suggestions based on what the user writes in
Project description
AutoCombobox
AutoCombobox is a Ttk widget based on the existing Combobox. It allows the user to write on the entry field, viewing at the same time some suggested option based on what the user writes. The suggestions are customizable through a function that can be defined by the developer.
Installation
AutoCombobox can be installed from PyPI using the command pip install autocombobox.
It doesn't have any dependences other than Tkinter.
Usage
AutoCombobox was created specifically to be used like the normal Ttk Combobox, so all its options are available.
Beside that, it can accept the filter option, that allows the developer to pass the function that determines the suggestions. The function must take 2 parameters: the first represent the list of all possible options of the Combobox, and the second represent the text written on the entry field; the function must returns a list of integers rappresenting the indices of the position of each option (a negative value indicates that the option will not be shown). There is a default filter function, that shows all the options that starts with the user input.
AutoCombobox makes available also various useful methods:
show_listboxandhide_listboxare the functions that manage the list of the Combobox options;update_valuestakes an optional string and filters the list of all possible values based on it, to show only suggestions. If no strings is given, it is taken from the entry field;selecttakes a string, and set the entry field with that. If the string is also in the possible value, it generate a<<ComboboxSelected>>event;change_highlighttakes the index of the option we want to highglights.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file autocombobox-1.5.1.tar.gz.
File metadata
- Download URL: autocombobox-1.5.1.tar.gz
- Upload date:
- Size: 35.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.27 {"installer":{"name":"uv","version":"0.9.27","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d0dc526edb590db824607521bc5efe6d5f634d98253630784e515c79b65221f1
|
|
| MD5 |
c36c6e897027d0cdfcf8d19bf3bf5947
|
|
| BLAKE2b-256 |
592d3bbbeb6a0af912970a9d5d3f3d3d805f73ff5ada3d00d5a4c4d3ba573ccb
|
File details
Details for the file autocombobox-1.5.1-py3-none-any.whl.
File metadata
- Download URL: autocombobox-1.5.1-py3-none-any.whl
- Upload date:
- Size: 31.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.27 {"installer":{"name":"uv","version":"0.9.27","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f180d8965fa1cc4d47d7bd2991c53227bbbe285c9a9ea1cd731ea920db928b4a
|
|
| MD5 |
6be1cd216b059fdfe744ee6dee92dc41
|
|
| BLAKE2b-256 |
258ea30f6879c7ac4fb541f1c79a534bb9262520d94a3b736d6cfc1f83a34e9e
|