Type RadioGroup

type RadioGroup struct {

	// tabStop is the one option Tab reaches; the arrow helper can focus the
	// others, which are SkipTab.

}

RadioGroup paints a single-selection set. Selection remains application state; each enabled option is an independently focusable stable hit.

Constructors

BeginRadioGroup#

func BeginRadioGroup(canvas *ui.Canvas, theme ui.Theme, bounds ui.Rect, options []RadioOption, selected ui.ID) RadioGroup

BeginRadioGroup starts a vertical radio group.

Methods

Disabled#

func (group RadioGroup) Disabled() RadioGroup

Disabled renders the complete group as inert.

Horizontal#

func (group RadioGroup) Horizontal() RadioGroup

Horizontal lays choices out in equal-width columns.

Paint#

func (group RadioGroup) Paint() RadioGroupResult

Paint draws choices and declares their hit regions. The circle sits on the left edge of its row and the label one item gap after it.