2025-05-22 1:22 PM
I am trying put a ScrollWheelWithStyle inside a ScrollContainer.
Currently I can't find a method to pass down dragEvents from the Container to the Wheel.
I tried disabling the scrolling for the Container.
This cause the areas to initiate the draggable to be within the Wheel but the event is still handled by the Container.
I also tried to change the code found in "...\touchgfx\framework\include\touchgfx\containers\ScrollableContainer.hpp", that cause the application to crash in both Simulators.
Does anyone have recommendation on how to have nested Scrollables?
2025-05-23 4:04 AM
Hello @Marc_LM ,
I see 2 ways to do that.
To see how to implement the second option, you can look at :
I hope this helps you.
If it answers your question, I inivite you to select this post as "best answer".
Regards,
2025-05-23 7:18 AM
Thank you for the suggestion.
I just tried to add a ScrollableContainer as a parent to the slide (example 1).
It too suffers from what I see were the ScrollableContainer starts to drag .
The ScrollableContainer is the culprit that does not propagate the click/drag to its children properly.
I'll take this into advice and remake a new ScrollableContainer.
Side note:
@GaetanGodart, I noticed a bug in the slider. I can just click at the right of it and it will trigger its completion. No sliding required. Not sure I will have time to send you a patched version to explain the bug.
2025-05-23 2:35 PM - edited 2025-05-23 2:38 PM
I could not change the ScrollableContainer itself but after cloning it and modding it, I nearly got something reasonable where click/drag propagate to children first.
If anyone know how to check if "handle*Event", is processed or not by their children.
I could use that check to enable dragging to children who do not handle them.
Looked into uninitialized vTable entries for object, but all reference discourages as being non-portable.
Any alternative would be welcome.
I am attaching the changed .hpp/.cpp for posterity.
2025-05-26 2:32 AM
Hello @Marc_LM ,
The slider behavior is not a bug.
If you add a slider (without a scrollable container) and press on the bar itsleft (not on the rectangle that moves), the rectangle that moves will snap to where you clicked.
This has recently been brought to TouchGFX's attention that this is not the prefered behavior and we will discuss what is the best implementation.
I am no aware of something telling you that a child entered handleXxxEvent.
However, you could clone the widget you want and modify their implementation of that event handler function to send some kind of signal of your choice :
Regards,
2025-05-27 11:32 AM
Hi @Marc_LM
This post has been escalated to the ST Online Support Team for additional assistance. We'll contact you directly.
Regards,
Billy