Widgets
Fyne widgets are divided into two parts: the behavior, which is what the main API exposes, and the renderer, which controls how a widget will look. Unless you are building a custom widget, it is not recommended to access the render functionality (hidden behind the widget.Renderer() utility function). Customization of the user interface, if required, should be managed using the theme package (refer to the next section).
All widgets can be created using their constructing function (such as NewButton("text", callback)) or using the initializer syntax, such as &Button{Text: "text", OnTapped: callback}. If the latter is used, then fields can also be set immediately after the widget is initiated until it is first rendered. After a widget ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access