Skip to main content

Introduction

Documentation Status Discord Build Status Code Style: Black

ListSelect widget for circuitpython displayio. Display a list of strings with a selection indicator allow user to move selection up and down.

Dependencies

This driver depends on:

Please ensure all dependencies are available on the CircuitPython filesystem. This is easily achieved by downloading the Adafruit library and driver bundle or individual libraries can be installed using circup.

Installing from PyPI

On supported GNU/Linux systems like the Raspberry Pi, you can install the driver locally from PyPI. To install for current user:

pip3 install circuitpython-displayio-listselect

To install system-wide (this may be required in some cases):

sudo pip3 install circuitpython-displayio-listselect

To install in a virtual environment in your current project:

mkdir project-name && cd project-name
python3 -m venv .venv
source .env/bin/activate
pip3 install circuitpython-displayio-listselect

Installing to a Connected CircuitPython Device with Circup

Make sure that you have circup installed in your Python environment. Install it with the following command if necessary:

pip3 install circup

With circup installed and your CircuitPython device connected use the following command to install:

circup install displayio_listselect

Or the following command to update an existing version:

circup update

Usage Example

import time
import displayio
import board
from displayio_listselect import ListSelect

display = board.DISPLAY

main_group = displayio.Group()
display.show(main_group)

items = ["First", "Second", "Third", "Fourth"]

list_select = ListSelect(scale=2, items=items)

main_group.append(list_select)

list_select.anchor_point = (0.5, 0.5)
list_select.anchored_position = (display.width // 2, display.height // 2)

for i in range(3):
    list_select.move_selection_down()
    time.sleep(1)

for i in range(3):
    list_select.move_selection_up()
    time.sleep(1)

list_select.selected_index = 3
while True:
    pass

Documentation

API documentation for this library can be found on Read the Docs.

For information on building library documentation, please check out this guide.

Contributing

Contributions are welcome! Please read our Code of Conduct before contributing to help this project stay welcoming.

Metadata

Release files for circuitpython-displayio-listselect 1.0.2

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

Source distribution (sdist)

Source distribution for circuitpython-displayio-listselect 1.0.2
File Size Uploaded
circuitpython-displayio-listselect-1.0.2.tar.gz 28.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for circuitpython-displayio-listselect 1.0.2
File Interpreter ABI Platform
circuitpython_displayio_listselect-1.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 34.1 kB

Release files / circuitpython-displayio-listselect-1.0.2.tar.gz

Download URL circuitpython-displayio-listselect-1.0.2.tar.gz
Size 28.5 kB
Tags Source
SHA-256 checksum
How to use checksums
4db13f7bbda59346812fb3f308ab65418eedf93fb0580e07ac01c21aedc0cba1
BLAKE2b-256 checksum
How to use checksums
5225a6ffb3f7bbce54417cfabdc45f1b812b25e617bc769178c0e4ee34868ff0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.3

Release files / circuitpython_displayio_listselect-1.0.2-py3-none-any.whl

Download URL circuitpython_displayio_listselect-1.0.2-py3-none-any.whl
Size 5.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5370b297654d0c2bd23e96d116139943fe9cf21830a61e64404c47690cc4fd8e
BLAKE2b-256 checksum
How to use checksums
fefd2a90c4eb4eb864fd1c3a40aad3c2754035d7c5dad38789271c3b5f7c5e7f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.3

Release history Release notifications | RSS feed

This release

1.0.2 This release

2 release files

1.0.1

2 release files

1.0.0

2 release files

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