Languages

Menu
Sites
Language
How to enable wheel scrolling in Dali::Toolkit::ScrollView?

Hi!

Dali::Toolkit::ScrollView has functions like SetWheelScrollDistanceStep. That indicates that it should be able to scroll when wheel events are received. However, I have not been able to achieve this. For some reason no wheel events seems to occur. Please help!

Best regards,
Stian Andre Olsen

Responses

5 Replies
K Johnson
Stian Andre Olsen

I have read the tutorial several times. It does not answer my question.

K Johnson

What's your Tizen Platform(Mobile/Wearable) and Tizen version? Also please share your source code here if possible.

Stian Andre Olsen

My platform is Tizen 3.0 wearable. I am developing for Samsung Gear S3 and Samsung Galaxy Watch. Will switch to Tizen 4.0 if and when Gear S3 gets updated to Tizen 4.0. Sharing the entire source code is not practical. Instead I can post small fractions. This does not work:

auto scrollView = Dali::Toolkit::ScrollView::New();
scrollView.WheelEventSignal().Connect(this, &PageView::onWheelEvent);

This works but is awkward since the stage gets all wheel events regardless of which control that has keyboard focus:

auto stage = Dali::Stage::GetCurrent();
stage.WheelEventSignal().Connect(this, &PageView::onWheelEvent);

And yes, I used the appropriate signatures for the PageView::onWheelEvent functions which is not the same for ScrollView and Stage. If wheel scrolling were added to one of the samples, e.g. the ScrollView or the ItemView sample, it would be very helpful.

Stian Andre Olsen

The above post contains things I have tried, but initially I thought ScrollView would handle the wheel events internally, just as it handles the pan gestures. Functions like SetWheelScrollDistanceStep indicates that ScrollView is capable of doing wheel scrolling. But how to activate this feature is a mystery. Please provide a sample that adds wheel scrolling to a ScrollView (or an ItemView). And by the way, since I am developing for wearables it is the watch wheel I am talking about, not a mouse wheel or something else. As mentioned, the Stage::WheelEventSignal is triggered by the watch wheel.

I have tested the Dali::Toolkit::Control::KeyEventSignal and this signal triggers for the watch's back button after I have called the control's SetKeyInputFocus() function. Initially, I expected a similar behaviour for the wheel event. Is there something else that needs to be enabled before wheel events are sent to a control?