Type RadioGroupResult

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

RadioGroupResult is what painting a radio group reports back.

Methods

Clicked#

func (result RadioGroupResult) Clicked() (ui.ID, bool)

Clicked returns the option whose click this paint is delivering, and false in every other paint (see ui.Canvas.Clicked), so the code that declares the group is the code that moves the selection:

if id, ok := components.BeginRadioGroup(canvas, theme, bounds, options, selected).Paint().Clicked(); ok {
	selected = id
}