‎2020-06-26 06:29 AM
I am sorry if this is a stupid question, but I have been looking for a way to enable the scroll bar on a Scroll Wheel widget.
Does this widget have scroll bar functionality?
My project will not use touch, so I am intending to use the Scroll Wheel indexed manually by a switch. Because the list of items in the wheel can sometimes be lengthy, I would like to implement scroll bars, but don't see a way to easily enable them (in the TouchGFX Designer, at least). Note that these scroll bars would be for indication purposes only and not touchable/scrollable.
If it does not have scroll bars, which widget do you suggest I use that does?
Thanks in advance for your input.
‎2020-06-26 07:55 AM
Hello,
No, indeed, there is no scroll bar implemented for the Scroll Wheel Widget.
To have this feature, you can use a ScrollableContainer (https://support.touchgfx.com/docs/development/ui-development/ui-components/containers/scrollable-container/) that has this scroll bar. I think this is what you are looking for. You can also refer to the ScrollableContainer Example in TouchGFX Designer.
On the other hand, if you really want a ScrollWheel with a scroll bar, and you are confident in your C++ and TouchGFX skills, you can try creating your own class/widget that merges the features of the ScrollWheel as well as the scroll bar functionality of the ScrollableContainer.
/Alexandre
‎2020-06-26 08:49 AM
@Alexandre RENOUX​
Thanks for your quick reply. I did review the ScrollableContainer, but wasn't sure if that was what I want based on the example on the document site (you referred to). I saw that the Designer didn't not have an easy way to add "elements" to the container (like the Scroll Wheel Widget does), so I did not pursue it further.
I also attempted to just add a ScrollWheel inside a ScrollableContainer, and in the simulator, there is a scroll bar, but I don't think it's working correctly.
Besides this, I believe that I may be required to change the look of the scroll bar from the default (if I could use a scrollbar, that is) and based on this discussion:
Martin said that there is no immediate way to do that.
So... I ended up just adding a rectangular box to match the look I want. I placed this box to the side of my vertical scroll wheel and can dynamically adjust its size based on the length of the list and dynamically change its vertical position based on the selected index of the ScrollWheel.
‎2020-06-27 06:55 AM
Hello,
Yes Martin is right.
The rectangular box is a way to do it indeed. Hope this gives you something you were looking for. =)
/Alexandre
‎2020-08-05 03:00 AM
Hi, I have a similar query. So thought of a rectangular box. But I'm not understanding how do I get the value of how miuch scrolllist has been scrolled to change the position of the rectangular box?