Skip to content
New issue

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

Cannot Extend widget.Filetree #45

Open
Intyflay opened this issue Aug 6, 2022 · 1 comment
Open

Cannot Extend widget.Filetree #45

Intyflay opened this issue Aug 6, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@Intyflay
Copy link

Intyflay commented Aug 6, 2022

The following code results in a thin blank bar with no content.

type customtree struct {
	xwidget.FileTree
}

func NewCustomTree(root fyne.URI) *customtree {
	tree := &customtree{}
	tree.ExtendBaseWidget(tree)
	tree.Root = root.String()
	return tree
}
@Jacalz
Copy link
Member

Jacalz commented Sep 21, 2022

Yeah that’s because the constructor unfortunately sets up pretty much all of the logic for the widget:

func NewFileTree(root fyne.URI) *FileTree {
. This could be fixed by moving some of the logic to the CreateRenderer() method.

@Jacalz Jacalz added the bug Something isn't working label Sep 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants