MCPcopy Create free account
hub / github.com/lxn/walk / Create

Method Create

declarative/toolbutton.go:60–77  ·  view source on GitHub ↗
(builder *Builder)

Source from the content-addressed store, hash-verified

58}
59
60func (tb ToolButton) Create(builder *Builder) error {
61 w, err := walk.NewToolButton(builder.Parent())
62 if err != nil {
63 return err
64 }
65
66 if tb.AssignTo != nil {
67 *tb.AssignTo = w
68 }
69
70 return builder.InitWidget(tb, w, func() error {
71 if tb.OnClicked != nil {
72 w.Clicked().Attach(tb.OnClicked)
73 }
74
75 return nil
76 })
77}

Callers

nothing calls this directly

Calls 4

InitWidgetMethod · 0.80
ParentMethod · 0.65
AttachMethod · 0.45
ClickedMethod · 0.45

Tested by

no test coverage detected