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
The first click on a tree item makes the tree jump to the top.
foo
package main import ( "fyne.io/fyne/v2" "fyne.io/fyne/v2/app" "fyne.io/fyne/v2/widget" ) func main() { a := app.New() w := a.NewWindow("Hello World") treeIDs := map[string][]string{ "": []string{"foo", "yay"}, "foo": []string{ "bar", "meh", "baz", "oops", "aaa", "bbb", "ccc", "ddd", "eee", "xxx", "zzz", "uuu", "iii", "ggg", "fff", "what", "ever", "this", "needs", "to", "be", "a", "long", "list", }, "yay": []string{"lala", "lol", "haha", "ha"}, } tree := widget.NewTree( func(id widget.TreeNodeID) []widget.TreeNodeID { if id != "" { return treeIDs[id] } r := []string{} for _, k := range treeIDs[id] { if len(treeIDs[k]) == 0 { continue } r = append(r, k) } return r }, func(id widget.TreeNodeID) bool { return len(treeIDs[id]) != 0 }, func(bool) fyne.CanvasObject { return widget.NewLabel("") }, func(i widget.TreeNodeID, _ bool, o fyne.CanvasObject) { o.(*widget.Label).SetText(i) }, ) w.SetContent(tree) w.Resize(fyne.NewSize(400, 400)) w.ShowAndRun() }
develop / fba693b
go1.23.3
MacOS Sonoma (14.7.1)
No response
The text was updated successfully, but these errors were encountered:
Fixed by the above PR
Sorry, something went wrong.
Hage put it in the fixes milestone in case we do 2.5.5
No branches or pull requests
Checklist
Describe the bug
The first click on a tree item makes the tree jump to the top.
How to reproduce
foo
Screenshots
Screen.Recording.2025-01-29.at.14.59.31.mov
Example code
Fyne version
develop / fba693b
Go compiler version
go1.23.3
Operating system and version
MacOS Sonoma (14.7.1)
Additional Information
No response
The text was updated successfully, but these errors were encountered: