Skip to content

Widget catalogue ​

Each family has a guide page (what each widget is for, how to use it, an example) and a generated API page (every public constructor, method and callback, read from the source).

FamilyGuideAPI
Core: Component, Panel, Label, Button, IconButton, Image, Tooltip, ScrollBar, ScrollPanelCore widgetsAPI
Display: Badge, ProgressBar, MeterBar, RichText, AnimatedImage, StatWeb, Toast, SpacerDisplay widgetsAPI
Interactive: Toggle, Checkbox, Radio, Slider, Select, OptionRotator, ToggleButtonBar, menus, Popover, ToolBar, DragHandle, pickersInteractive widgetsAPI
Text: TextInput, TextArea, MaskedInput, InputField, SearchBox, NumberStepper, Tag, TagBar, ColorPickerText widgetsAPI
Containers: Window, TabBar, lists, trees, Accordion, NavDrawer, layoutsContainersAPI
Composites: DataTable, GradientEditorCompositesAPI

What every widget shares ​

All widgets extend Component, so these work everywhere:

MethodUse
setPosition(x, y), setSize(w, h)Place and size it. In a Window body a placed child leaves the flow and its siblings keep flowing; other layout parents may override the position.
setEnabled(v), bindEnabled(ref)Disable it, or follow a Ref<boolean>.
setVisible(v), bindVisible(ref)Hide it, or follow a Ref<boolean>.
setVariant(v)Pick a theme variant (VARIANT_PRIMARY, VARIANT_DANGER and so on).
setTheme(theme)Give it (and its children) an explicit theme.
setTooltipText(text, family, size)A one-line tooltip on hover.
setContextMenu(menu)A right-click menu.
setOnActivate(fn)Called when it, or a child, is clicked.
dispose()Free it and everything it owns.

Most constructors take a name first, then, for widgets that show text, a font family ("default") and a size in pixels.

Every widget in XML ​

Each widget's XML tag, with its attributes and events, is in the tag reference.