Widgets
pdwidgets has 49 widgets. Reach each one as pd.Name after import pdwidgets as pd; the module loads the first time you use it. On a board short of memory,
import the widget directly instead, such as from pdwidgets.widgets.button import Button, so only the widgets you use are loaded.
Every widget takes its parent first and accepts x, y, w, h, align,
align_to, fg, bg, visible, value and padding as keywords, plus the
arguments of its own, documented in its docstring in
lib/pdwidgets. A Label
takes its text as value=, and a Button takes it as label=; neither takes
text=.
The tables are grouped by what the widget is for.
Text and input
Widget |
Module |
What it is |
|---|---|---|
|
|
Text display using romfont or an optional proportional font. |
|
|
Read-only formatted text display. |
|
|
Single-line editable text field with focus management. |
|
|
Single-line password entry; drawn text is replaced with |
|
|
Bounded numeric stepper with |
|
|
On-screen QWERTY keyboard for focused text fields. |
|
|
3×4 numeric keypad for PIN or code entry. |
Selection and toggles
Widget |
Module |
What it is |
|---|---|---|
|
|
Pill track with sliding knob for boolean on/off. |
|
|
Boolean toggle rendered as checked/unchecked icons. |
|
|
Mutually exclusive checked icon; belongs to a |
|
|
Invisible coordinator that enforces single radio selection. |
|
|
Exclusive pill-style segment selector. |
|
|
Header button that opens a modal list of options. |
|
|
Draggable 0–1 value control with a circular knob. |
|
|
RGB565 color picker with hue strip and saturation/value region. |
|
|
Month calendar for selecting a date. |
Layout containers
Widget |
Module |
What it is |
|---|---|---|
|
|
Rounded container with optional title and drop shadow. |
|
|
A container that lays its children out left-to-right with fixed spacing. |
|
|
A container that stacks its children top-to-bottom with fixed spacing. |
|
|
Fixed-column grid layout container. |
|
|
Clipped scrollable viewport with drag, wheel, and scrollbar. |
|
|
Scroll control with end arrows and a central slider. |
|
|
Vertically scrollable list container. |
|
|
Stack of titled expansion panels; |
|
|
Tab bar plus content area with one |
|
|
Full-bleed content page for Navigator or |
|
|
Register named field widgets and collect/validate their values. |
|
|
Horizontal row with a left label and trailing control. |
Feedback and overlays
Widget |
Module |
What it is |
|---|---|---|
|
|
Modal message box with title, body, and action buttons. |
|
|
Transient bottom banner that auto-hides after a duration. |
|
|
Horizontal or vertical progress indicator (0–1). |
|
|
Animated circular busy indicator. |
Display
Widget |
Module |
What it is |
|---|---|---|
|
|
Lightweight line or bar chart for numeric sequences. |
|
|
Arc gauge displaying a normalized value in |
|
|
Live-updating HH:MM:SS clock label. |
The classes underneath
Name |
What it is |
|---|---|
|
Joins a display driver to an app, routes input to widgets and draws the ones that changed. |
|
One full-display page. A |
|
The base of every widget: geometry, children, visibility, callbacks. Use it directly for a custom container. |
|
A repeating job scheduled with |
|
The color roles and the icon names widgets use. |
|
Alignment flags and percentage sizes. See Lay out widgets. |