Displaying long texts in a small text area.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-01-28 12:35 AM
Is it possible that long texts automatically are displayed in a small text area by running endless to the end of the text and starting again at the beginning? Scrolling the text within one textline?
Are there examples in youtube to see the result, and how it has to be used?
- Labels:
-
TouchGFX
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-01-28 1:17 AM
Hi,
Yes.
textArea.setTypedText(TypedText(T_MYLONGTEXT);
textArea.setWideTextAction(WIDE_TEXT_WORDWRAP);
You can do the same for something like chinese with:
textArea.setWideTextAction(WIDE_TEXT_CHARWRAP);
/Martin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-01-28 2:20 AM
Is there also another solution? I don't want the long text in a new line. I would prefer when my text could running through the first line like a treadmill.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-01-28 2:29 AM
That's what WORDWRAP does. It breaks for you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-01-28 2:41 AM
Hi @MHase​
I've tried the WIDE_TEXT_WORDWRAP but I need in one line too..
So I've implemented a function to rotate the Wildcard buffer, below you can find the function:
void Screen_MultimidiaView::string_rotate_right( char *s )
{
size_t n = strlen( s );
if ( n > 1 )
{
char c = s[n - 1];
memmove( s + 1, s, n - 1 );
*s = c;
}
}
void Screen_MultimidiaView::string_rotate_left( char *s )
{
size_t n = strlen( s );
if ( n > 1 )
{
char c = s[0];
memmove( s, s+1, n - 1 );
s[n - 1] = c;
}
}
This function rotate in one character, so for example you can call this function each second.
Regards,
Anderson
