Skip to content

Commit

Permalink
improve widgets sample in blog
Browse files Browse the repository at this point in the history
  • Loading branch information
kkoreilly committed Jul 16, 2024
1 parent c29d979 commit 64c4874
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions content/blog/-2024-07-17-initial-release.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,13 @@ core.NewButton(b).SetText("Hello, World!").SetIcon(icons.Send).OnClick(func(e ev
core.NewText(b).SetText("Name:").SetTooltip("Enter your name in the text field")
core.NewTextField(b).SetPlaceholder("Jane Doe")
value := float32(0.5)
spin := core.Bind(&value, core.NewSpinner(b))
slide := core.NewSlider(b)
spin.OnChange(func (e events.Event) {
slide.SetValue(value)
slide.Update()
spinner := core.Bind(&value, core.NewSpinner(b))
slider := core.Bind(&value, core.NewSlider(b))
spinner.OnChange(func(e events.Event) {
slider.Update()
})
slider.OnChange(func(e events.Event) {
spinner.Update()
})
core.NewColorButton(b).SetColor(colors.Orange)

Expand Down

0 comments on commit 64c4874

Please sign in to comment.