0.0.19 Scale/numedit interconnection done. /JL

This commit is contained in:
2022-12-13 22:22:53 +01:00
parent 5a4b01fde9
commit e0839aa3b7
2 changed files with 7 additions and 2 deletions
+1 -1
View File
@@ -27,7 +27,7 @@ type MyMainWindow struct {
const ( const (
AppName string = "BeadImager" AppName string = "BeadImager"
Version string = "0.0.18" Version string = "0.0.19"
CopyRight string = "©2022 Jan Lerking" CopyRight string = "©2022 Jan Lerking"
STD_MESS string = "Ready" STD_MESS string = "Ready"
UserPath string = "C:\\Users\\janle\\BeadImager" UserPath string = "C:\\Users\\janle\\BeadImager"
+6 -1
View File
@@ -91,11 +91,16 @@ func (cp *PropScale) newScaleProperties(mw *MyMainWindow) {
log.Println("Setting scale number edit value to: ", nn) log.Println("Setting scale number edit value to: ", nn)
sc.SetValue(nn) sc.SetValue(nn)
}) })
sc.SetWidth(30)
sc.SetDecimals(0) sc.SetDecimals(0)
sc.SetRange(10, 200) sc.SetRange(10, 200)
nn := float64(slider.Value()) nn := float64(slider.Value())
sc.SetValue(nn) 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...") log.Println("Setting background color...")
bg, _ := walk.NewSolidColorBrush(walk.RGB(255, 255, 255)) bg, _ := walk.NewSolidColorBrush(walk.RGB(255, 255, 255))
cp.property.SetBackground(bg) cp.property.SetBackground(bg)