func (hs HSpacer) Create(builder *Builder) (err error) { var w *walk.Spacer if hs.Size > 0 { if w, err = walk.NewHSpacerFixed(builder.Parent(), hs.Size); err != nil { return } } else { if w, err = walk.NewHSpacer(builder.Parent()); err != nil { return } } return builder.InitWidget(hs, w, nil) }
func (hs HSpacer) Create(parent walk.Container) (err error) { var w *walk.Spacer if hs.Size > 0 { if w, err = walk.NewHSpacerFixed(parent, hs.Size); err != nil { return } } else { if w, err = walk.NewHSpacer(parent); err != nil { return } } return InitWidget(hs, w, nil) }