diff --git a/AUTHORS b/AUTHORS index 4da81936..62317fe0 100644 --- a/AUTHORS +++ b/AUTHORS @@ -27,3 +27,4 @@ Semyon Tokarev Shawn Sun Tim Dufrane Vincent Vanackere +Lorenz Rosenthal diff --git a/declarative/listbox.go b/declarative/listbox.go index cb51daf2..2821b33c 100644 --- a/declarative/listbox.go +++ b/declarative/listbox.go @@ -53,6 +53,7 @@ type ListBox struct { AssignTo **walk.ListBox DataMember string Format string + CurrentIndex int Model interface{} MultiSelection bool OnCurrentIndexChanged walk.EventHandler @@ -80,6 +81,7 @@ func (lb ListBox) Create(builder *Builder) error { return builder.InitWidget(lb, w, func() error { w.SetFormat(lb.Format) w.SetPrecision(lb.Precision) + w.SetCurrentIndex(lb.CurrentIndex) if err := w.SetDataMember(lb.DataMember); err != nil { return err