类型 RadioGroup

API 文档由 Go 源码生成,内容为英文。

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.

构造函数

BeginRadioGroup#

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

BeginRadioGroup starts a vertical radio group.

方法

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.