Word warp issue with multi-line texts (3 lines)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-09-26 6:42 AM
Hi,
I am using word wrap with Text Area component:
textArea.setWideTextAction(WIDE_TEXT_WORDWRAP);
My texts are usually so long that they need to be wrapped to 3 lines.
I have seen no issue with the first wrap (between line 1 and 2), but the second warp (between lines 2 and 3) does not work correctly. The end word is usually broken in the middle (the library tries to put there as many characters as possible).
It appears as if "character wrap" is enabled between 2nd and 3rd line.
Tested on Touch GFX 4.20, but the behaviour was observed at least since 4.17 version.
Am I missing some settings? Or is it simply a bug?
Thanks,
Petr
- Labels:
-
TouchGFX
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-09-27 2:03 AM
Hello PWagn.1,
I've tried on my side and I did not reproduce the issue.
Is it possible for you to share your project ?
/Osman
ST Software Developer | TouchGFX
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-10-05 4:26 AM
Hi,
sorry for delay, it took me longer to further investigate.
The issue is caused by height of the text area. It seems that if the height is slightly lower than certain value, the library switches to character-wrapping instead of word wrapping on last but one line.
Example in my case:
- font: Exo2Light (size 18)
- text area height 68px (3 lines) causes switch to character wrap
- text area height 70px (3 lines) works as expected
- Used text; "Error ***: No frequency feedback from fan after 1 minute"
- custom board with L431 MCU, partial buffering
- Note: On Nucleo G071RB+GFX01M1 AZ1, I observe similar behaviour, but the heights are different: 64px character wrap, 66px word wrap
For the height of 68 (or 64px) pixels, there is no visible cropping of the text on the bottom of text field.
I do not know, what is the specification, but I would expect that word wrapping should be used in all cases. Especially when the multi-line texts are not supported via GUI and they must be enabled via code. Then the determination of needed height is trial and error.
Thanks,
Petr
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-10-05 4:35 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-10-05 4:45 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-10-11 7:07 AM
Hello PWagn.1,
We took note of this issue and have colleagues on it. That's very strange indeed.
"I would expect that word wrapping should be used in all cases. Especially when the multi-line texts are not supported via GUI and they must be enabled via code" --> Actually it's possible from TouchGFX Designer to enter multi lines texts :
Go to Texts section in the left panel and find your resource from there. You can then from this interface edit your text and just add a new line to it by pressing the "ENTER" key .
So I suggest you to use this workaround until we got a fix for this bug. You can also increase the height of your TextArea as you showed me.
I'll get back to you when I'll have more info about the fix.
/Osman
ST Software Developer | TouchGFX
