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

Can't change the text of widget.FormItem #1231

Closed
mondy opened this issue Jul 31, 2020 · 2 comments
Closed

Can't change the text of widget.FormItem #1231

mondy opened this issue Jul 31, 2020 · 2 comments
Labels
bug Something isn't working
Milestone

Comments

@mondy
Copy link

mondy commented Jul 31, 2020

Describe the bug:

Can't change the text of widget.FormItem
Which object should I call Refresh on?

To Reproduce:

Steps to reproduce the behaviour:

  1. Run the following code
  2. Click on change button
  3. 'foo' doesn't replace 'bar'

Example code:

package main

import (
	"fyne.io/fyne/app"
	"fyne.io/fyne/widget"
)

func main() {
	application := app.New()
	window := application.NewWindow("")

	item := widget.NewFormItem("foo", widget.NewEntry())
	form := widget.NewForm(item)

	button := widget.NewButton("change", func() {
		item.Text = "bar"
		item.Widget.Refresh()
		form.Refresh()
		window.Content().Refresh()
	})

	window.SetContent(widget.NewVBox(
		button,
		form,
	))

	window.ShowAndRun()
}

Device :

  • OS: Ubuntu 20.04
  • Go version: 1.14.3 linux/amd64
  • Fyne version: v1.3.2
@andydotxyz andydotxyz added the bug Something isn't working label Aug 1, 2020
@andydotxyz
Copy link
Member

it should be Form.Refresh() - it looks like we missed it.

@andydotxyz andydotxyz added this to the 1.3.x milestone Aug 1, 2020
@andydotxyz
Copy link
Member

In release/v1.3.3 branch for testing, should go out this week.

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