lxn / walk

A Windows GUI toolkit for the Go Programming Language
Other
6.78k stars 886 forks source link

ListBox.OnCurrentIndexChanged in GroupBox ineffective #811

Open coder-wangfugui opened 1 year ago

coder-wangfugui commented 1 year ago

when I put ListBox in GroupBox ,OnCurrentIndexChanged and OnItemActivated is Ineffective。

I modified the listbox example, just like this:

                           GroupBox{
                Layout: VBox{},
                Children: []Widget{
                    ListBox{
                        AssignTo:              &mw.lb,
                        Model:                 mw.model,
                        OnCurrentIndexChanged: mw.nglb_CurrentIndexChanged,
                        OnItemActivated:       mw.nglb_ItemActivated,
                    },
                    TextEdit{
                        AssignTo: &mw.te,
                        ReadOnly: true,
                    },
                },
coder-wangfugui commented 1 year ago

I put HSplitter in GroupBox, and the methods are useful. I still want to know the reason. Forgive me