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

ScrollContainer.Refresh() doesn't seem to work properly #1341

Closed
wenhsinhsieh opened this issue Sep 26, 2020 · 2 comments
Closed

ScrollContainer.Refresh() doesn't seem to work properly #1341

wenhsinhsieh opened this issue Sep 26, 2020 · 2 comments

Comments

@wenhsinhsieh
Copy link

Describe the bug:

ScrollContainer.Refresh() doesn't seem to work properly

Example code:

Changing the content of a ScrollContainer and refresh doesn't really update the screen, for example:

something := drawSomething()
container := widget.NewScrollContainer(something)

updateButton := widget.NewButton("Update", func() {
	container.Content = drawSomethingElse()
	container.Refresh()
})

However, if I wrap the content in another container, it works as expected, for example:

something := drawSomething()
innerContainer := fyne.NewContainerWithLayout(layout.NewVBoxLayout(), something)
container := widget.NewScrollContainer(innerContainer)

updateButton := widget.NewButton("Update", func() {
	innerContainer.Objects = []fyne.CanvasObject{drawSomethingElse()}
	innerContainer.Refresh()
})

So I doubt that something wrong with the ScrollContainer.Refresh()

Device (please complete the following information):

  • OS: Windos
  • Version: 10
  • Go version: 1.14.6
  • Fyne version: 1.3.3
@andydotxyz
Copy link
Member

This is fixed on develop for testing, will be in 1.4 release

@wenhsinhsieh
Copy link
Author

wenhsinhsieh commented Sep 26, 2020

Wow you fix it so fast! Thank you very much!

andydotxyz added a commit to andydotxyz/fyne that referenced this issue Sep 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants