We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
最近遇到个小问题,在使用ComboBox组件,由于需要获取当前选中项,然后就注册了OnCurrentIndexChanged函数。不过实际情况和预期有点小差别,那个函数被连续触发了三次,是因为某些属性未正确设置的原因么?相关源码如下:
package main import ( "fmt" "github.com/lxn/walk" . "github.com/lxn/walk/declarative" "time" ) func main() { var win *walk.MainWindow MainWindow{ AssignTo: &win, Title: "ComboBox", MinSize: Size{600, 400}, Layout: VBox{}, Children: []Widget{ ComboBox{ Model: []string{"Combo", "Box", "CB"}, OnCurrentIndexChanged: func() { fmt.Println(time.Now().String()) // 2023-03-26 15:10:09.3184992 +0800 CST m=+2.503204401 // 2023-03-26 15:10:09.3393394 +0800 CST m=+2.524044601 // 2023-03-26 15:10:09.340897 +0800 CST m=+2.525602201 }, }, }, }.Run() }
其中walk库的相关信息 github.com/lxn/walk v0.0.0-20210112085537-c389da54e794
github.com/lxn/walk v0.0.0-20210112085537-c389da54e794
The text was updated successfully, but these errors were encountered:
No branches or pull requests
最近遇到个小问题,在使用ComboBox组件,由于需要获取当前选中项,然后就注册了OnCurrentIndexChanged函数。不过实际情况和预期有点小差别,那个函数被连续触发了三次,是因为某些属性未正确设置的原因么?相关源码如下:
其中walk库的相关信息
github.com/lxn/walk v0.0.0-20210112085537-c389da54e794
The text was updated successfully, but these errors were encountered: