2020-11-28 12:00 AM
I have big text which I need to scroll left to right in loop with touch gfx. When I read more on it and found about scrollableContainer but kinda unsure how to combine it with my text object widget.
I added below code
scrollableTripAdviceParameterText_II.setPosition(509, 353, 282, 57);
scrollableTripAdviceParameterText_II.enableHorizontalScroll(true);
scrollableTripAdviceParameterText_II.setScrollbarsColor(touchgfx::Color::getColorFrom24BitRGB(240, 235, 235));
// below code is added by me
scrollableTripAdviceParameterText_II.add(tripAdviceParameterText_II);
scrollableTripAdviceParameterText_II is Scrollable Container widget and tripAdviceParameterText_II is text widget
Is there any other way to add Scrollable Container for my application? I read few blogs on it but unable to figure it out.
Thanks
2020-12-02 06:25 AM
Because the X position of the text is referenced relative to it's parent (the container), the end position can stay -textArea.getWidth(). Behind the scenes, the textArea itself is much wider (and scales to wildcard size). But because it is inside a small container, and elements are not visible in areas outside their parent containers, you only see a few characters at a time.
See attached video.
2020-12-04 06:53 AM
@Chandan Bhatia Any luck with this solution?
2020-12-06 09:52 PM
@Michael K Hi, Missed your response. I tried adding text to empty container but in touchgfx I can't find any option to make textArea1 as a child.
2020-12-07 04:45 AM
In the left sidebar with all the screens listed, and all the objects on the screens, just drag the text area item on top of the container item