Skip to content

form_row

pdwidgets.widgets.form_row

Label plus control form row.

FormRow(parent, x=0, y=0, w=None, h=None, align=None, align_to=None, fg=None, bg=None, visible=True, value=None, padding=None, label='', scale=1, font=None)

Bases: Widget

Horizontal row with a left label and trailing control.

A label-on-the-left row sized for a trailing control (Switch, Dropdown…).

Create the row, then construct the control as a child of this row (it will be nudged to the right). Example::

row = FormRow(card, label="Wi-Fi", y=y)
Switch(row, align=ALIGN.RIGHT, value=True)

ListTile is an alias of this class.

add_child(child)

Add a child; non-label children are treated as the trailing control.