taselection package

This package is a plug-in replacement for toga.Selection which implements the missing set_font() for Android.

TaSelection class

class tatogalib.ui.taselection.TaSelection(id: str | None = None, style: StyleT | None = None, items: ListSourceT | Iterable | None = None, accessor: str | None = None, value: object | None = None, on_change: OnChangeHandler | None = None, enabled: bool = True, **kwargs)

Create a new Selection widget.

Parameters:
  • id – The ID for the widget.

  • style – A style object. If no style is provided, a default style will be applied to the widget.

  • items – Initial [items][toga.Selection.items] to display for selection.

  • accessor – The accessor to use to extract display values from the list of items. See [items][toga.Selection.items] and [value][toga.Selection.value] for details on how accessor alters the interpretation of data in the Selection.

  • value – Initial value for the selection. If unspecified, the first item in items will be selected.

  • on_change – Initial [on_change][toga.Selection.on_change] handler.

  • enabled – Whether the user can interact with the widget.

  • kwargs – Initial style properties.