类型 RadioGroupResult

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

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

RadioGroupResult is what painting a radio group reports back.

方法

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
}