0.3.6 Dialog work. /JL
This commit is contained in:
10
dialog.go
10
dialog.go
@@ -23,12 +23,13 @@ func (mv *MyMainWindow) addBeads(name string, data Serie, id int, bg walk.Brush)
|
||||
cmp.SetLayout(walk.NewHBoxLayout())
|
||||
cmp.Layout().SetMargins(walk.Margins{0, 0, 0, 0})
|
||||
cmp.SetAlignment(walk.AlignHCenterVCenter)
|
||||
walk.NewHSpacer(cmp)
|
||||
lbl, _ := walk.NewTextLabel(cmp)
|
||||
lbl.SetText(name + " - " + strconv.Itoa(id))
|
||||
lbl.SetAlignment(walk.AlignHCenterVCenter)
|
||||
walk.NewHSpacer(cmp)
|
||||
cmp.SetBackground(bg)
|
||||
gr, _ := walk.NewGroupBox(dlg)
|
||||
gr.SetTitle("Beads")
|
||||
fm, _ := walk.NewComposite(gr)
|
||||
fm, _ := walk.NewComposite(dlg)
|
||||
fm.SetLayout(walk.NewVBoxLayout())
|
||||
fm.Layout().SetMargins(walk.Margins{0, 0, 0, 0})
|
||||
br, _ := walk.NewSolidColorBrush(walk.RGB(255, 255, 255))
|
||||
@@ -44,7 +45,7 @@ func (mv *MyMainWindow) addBeads(name string, data Serie, id int, bg walk.Brush)
|
||||
le.SetRange(0, 1000)
|
||||
bnr, _ := walk.NewComposite(fm)
|
||||
bnr.SetLayout(walk.NewHBoxLayout())
|
||||
lbl, _ = walk.NewTextLabel(bgr)
|
||||
lbl, _ = walk.NewTextLabel(bnr)
|
||||
lbl.SetText("Number:")
|
||||
lbl.SetAlignment(walk.AlignHCenterVNear)
|
||||
walk.NewHSpacer(bnr)
|
||||
@@ -53,6 +54,7 @@ func (mv *MyMainWindow) addBeads(name string, data Serie, id int, bg walk.Brush)
|
||||
ne.SetRange(0, 100000)
|
||||
bc, _ := walk.NewComposite(dlg)
|
||||
bc.SetLayout(walk.NewHBoxLayout())
|
||||
bc.Layout().SetMargins(walk.Margins{0, 0, 0, 0})
|
||||
ab, _ := walk.NewPushButton(bc)
|
||||
ab.SetText("Add")
|
||||
dlg.SetDefaultButton(ab)
|
||||
|
||||
Reference in New Issue
Block a user