Clicked#
func (result ButtonResult) Clicked() boolClicked reports whether this paint is delivering a click on the button.
API 文档由 Go 源码生成,内容为英文。
type ButtonResult struct {
// contains filtered or unexported fields
}ButtonResult is what painting a button reports back. Clicked is true in the event pass of a click on that button (see ui.Canvas.Clicked), so the code that declares a button is the code that handles it:
if components.BeginButton(canvas, theme, save, bounds).Default("Save").Clicked() {
model.save()
}Clicked#func (result ButtonResult) Clicked() boolClicked reports whether this paint is delivering a click on the button.