2025-02-26 7:49 AM
I am working with TouchGFX Designer 4.24.2
If I assign a different Scrollbar width to a scrollableContainer in Screen1view::setupScreen()
after or before the command Screen1ViewBase::setup();
scrollableContainerMainMenu.setScrollbarWidt(50);
scrollableContainerMainMenu.invalidate();
the scrollbar is only 50 pixels wide after you click into the ScrollableContainer.
What do you have to do so that it is displayed in the correct width from the start?
2025-02-28 1:51 AM
Hello @User2025 and welcome to the community!
Simply call
scrollableContainerName.childGeometryChanged();
and your new scrollbar width will be shown before you even touch the scrollableContainer.
If this comment answer your question, I invite you to select it as "best answer".
Regards,
2025-03-13 3:32 AM
Hello @User2025 ,
Have you been able to solve your issue?
Regards,
2025-03-24 11:24 PM
Hello GaetanGodart,
thank you very much for your help. It works well.
I try it with
scrollableContainerMainMenu.doScroll(0, 0);
but this only works with Y values not equal to 0 (e.g. -1).
scrollableContainerMainMenu.doScroll(0, -1);
Regards,
2025-03-25 2:06 AM - edited 2025-03-25 8:03 AM
Hello @User2025 ,
This seems to be a completely different question here.
scrollableContainerMainMenu.doScroll(x, y) is used to scroll the container up/down and left/right.
Therefore, using 0 as a value will scroll 0 pixels.
So I don't see what is the issue here.
Regards,