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

Entry's Wrapping Option not work in version 2.4.0 #4212

Closed
2 tasks done
sunvim opened this issue Sep 2, 2023 · 7 comments
Closed
2 tasks done

Entry's Wrapping Option not work in version 2.4.0 #4212

sunvim opened this issue Sep 2, 2023 · 7 comments
Labels
unverified A bug that has been reported but not verified

Comments

@sunvim
Copy link

sunvim commented Sep 2, 2023

Checklist

  • I have searched the issue tracker for open issues that relate to the same problem, before opening a new one.
  • This issue only relates to a single bug. I will open new issues for any other problems.

Describe the bug

in version v2.3.5 , it works well, it shows like below:

18d5eddccd74aeaa8.png

but in v2.4.0 it not work, it shows like below:
1012741adee7aadf8.png

How to reproduce

run last code

Screenshots

No response

Example code

package main

import (
"fyne.io/fyne/v2"
"fyne.io/fyne/v2/app"
"fyne.io/fyne/v2/container"
"fyne.io/fyne/v2/layout"
"fyne.io/fyne/v2/widget"
)

func main() {
myApp := app.New()
myWindow := myApp.NewWindow("entry wrapping bug")

pwdLabel := widget.NewLabel("passwd")
passwd := widget.NewEntry()
passwd.Wrapping = fyne.TextWrapOff
passwd.SetPlaceHolder("this password input entry")
confirmLabel := widget.NewLabel("confirm")
confirm := widget.NewEntry()
confirm.Wrapping = fyne.TextWrapOff
confirm.SetPlaceHolder("this confirm input entry")
grid := container.New(layout.NewFormLayout(), pwdLabel, passwd, confirmLabel, confirm)
myWindow.SetContent(grid)
myWindow.ShowAndRun()
}

Fyne version

2.4.0

Go compiler version

1.21.0

Operating system and version

Linux home-ws 6.1.49-1-MANJARO #1 SMP PREEMPT_DYNAMIC Sun Aug 27 23:08:04 UTC 2023 x86_64 GNU/Linux

Additional Information

hope this project better and better!

@sunvim sunvim added the unverified A bug that has been reported but not verified label Sep 2, 2023
@sunvim sunvim changed the title Entry's Wrappint Option not work in version 2.4.0 Entry's Wrapping Option not work in version 2.4.0 Sep 2, 2023
@andydotxyz
Copy link
Member

I'm not sure what you're reporting - the entries do not appear to be wrapping.
What is the outcome expected that was not in 2.4.0?

@Jacalz
Copy link
Member

Jacalz commented Sep 2, 2023

Also please don’t share parts of an entire project for the example code. The text states that you should share a minimal running example.

@sunvim
Copy link
Author

sunvim commented Sep 3, 2023

I'm not sure what you're reporting - the entries do not appear to be wrapping. What is the outcome expected that was not in 2.4.0?

humm, sorry about that, I mean if I close the entry text wrapping, set Wrapping = fyne.TextWrapOff , it should show like below in version v2.3.5 :

1.png

@sunvim
Copy link
Author

sunvim commented Sep 3, 2023

Also please don’t share parts of an entire project for the example code. The text states that you should share a minimal running example.

ok ,let me reedit it, thanks

@sunvim
Copy link
Author

sunvim commented Sep 3, 2023

if adjust code, set entry Scroll attr to 3 , it works well!

package main

import (
	"fyne.io/fyne/v2"
	"fyne.io/fyne/v2/app"
	"fyne.io/fyne/v2/container"
	"fyne.io/fyne/v2/layout"
	"fyne.io/fyne/v2/widget"
)

func main() {
	myApp := app.New()
	myWindow := myApp.NewWindow("entry wrapping bug")

	pwdLabel := widget.NewLabel("passwd")
	passwd := widget.NewEntry()
	passwd.Scroll = 3
	passwd.SetPlaceHolder("this password input entry")
	passwd.Wrapping = fyne.TextWrapOff
	confirmLabel := widget.NewLabel("confirm")
	confirm := widget.NewEntry()
	confirm.Scroll = 3
	confirm.SetPlaceHolder("this confirm input entry")
	confirm.Wrapping = fyne.TextWrapOff
	grid := container.New(layout.NewFormLayout(), pwdLabel, passwd, confirmLabel, confirm)
	myWindow.SetContent(grid)
	myWindow.ShowAndRun()
}

it shows:
1b0763efcfb731f8e.png

but the widget Entry attr Scroll value does not open for developer, so I have to set confirm.Scroll = 3, it should set confirm.Scroll=ScrollNone

11083d11c14992181.png

The following is based on the source:
149f606228fbf8408.png

@andydotxyz
Copy link
Member

Set it to container.ScrollNone then.
Maybe this was missed from the changelog, I will get it into the upgrade notes

@andydotxyz
Copy link
Member

I added a note to https://developer.fyne.io/api/v2.4/upgrading, hopefully that helps others that don't see where the constants are. They were used in RichText in 2.3, though it would be nice to find a solution that IDEs can suggest.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
unverified A bug that has been reported but not verified
Projects
None yet
Development

No branches or pull requests

3 participants