Type ButtonGroup

type ButtonGroup struct {
	// contains filtered or unexported fields
}

ButtonGroup paints related actions as one connected control. Each action takes its colors from the same recipe as a Button of its variant, so a group can hold any of them.

Constructors

BeginButtonGroup#

func BeginButtonGroup(canvas *ui.Canvas, theme ui.Theme, bounds ui.Rect, options []ButtonGroupOption) ButtonGroup

BeginButtonGroup starts a grouped action declaration.

Methods

Disabled#

func (group ButtonGroup) Disabled() ButtonGroup

Disabled renders every action as inert.

Paint#

func (group ButtonGroup) Paint() ButtonGroupResult

Paint draws the actions side by side, rounded only at the group's outer corners, with a hairline between neighbours and a shared outline when any of them is an outline button.

Vertical#

func (group ButtonGroup) Vertical() ButtonGroup

Vertical stacks connected actions and collapses adjoining horizontal borders.