From e0839aa3b78534229164e4f73c2876eba6252df4 Mon Sep 17 00:00:00 2001 From: Lerking Date: Tue, 13 Dec 2022 22:22:53 +0100 Subject: [PATCH] 0.0.19 Scale/numedit interconnection done. /JL --- main.go | 2 +- properties.go | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/main.go b/main.go index 491b79f..6b02409 100644 --- a/main.go +++ b/main.go @@ -27,7 +27,7 @@ type MyMainWindow struct { const ( AppName string = "BeadImager" - Version string = "0.0.18" + Version string = "0.0.19" CopyRight string = "©2022 Jan Lerking" STD_MESS string = "Ready" UserPath string = "C:\\Users\\janle\\BeadImager" diff --git a/properties.go b/properties.go index fb7f77b..b08d4d6 100644 --- a/properties.go +++ b/properties.go @@ -91,11 +91,16 @@ func (cp *PropScale) newScaleProperties(mw *MyMainWindow) { log.Println("Setting scale number edit value to: ", nn) sc.SetValue(nn) }) - sc.SetWidth(30) sc.SetDecimals(0) sc.SetRange(10, 200) nn := float64(slider.Value()) sc.SetValue(nn) + sc.ValueChanged().Attach(func() { + log.Println("Scale number edit value changed") + nn := float64(sc.Value()) + log.Println("Setting scale slider value to: ", nn) + slider.SetValue(int(nn)) + }) log.Println("Setting background color...") bg, _ := walk.NewSolidColorBrush(walk.RGB(255, 255, 255)) cp.property.SetBackground(bg)