Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
Developer
Posts: 65
Registered: ‎05-21-2012
My Device: DA C, Z10 LE, Passport
My Carrier: Wind
Accepted Solution

focus retain outside of custom control

Hi,

 

I am making a custom control similar to the Slider component.

When I tap on the native slider and go outside it with the finger, the slider continue to have the focus and hence the handle continue moving.

I would like to achieve this behavior with my custom control, but when I move the finger outside it, it loses focus.

Any idea how to do this ?

 

thanks in advance

Developer
Posts: 65
Registered: ‎05-21-2012
My Device: DA C, Z10 LE, Passport
My Carrier: Wind

Re: focus retain outside of custom control

[ Edited ]

resolved using TouchBehavior.

Adding it to the root container of the custom control, it will receives touch events also when the finger goes out of the bounduaries:

m_rootContainer->addTouchBehavior( 
TouchBehavior::create()
.addTouchReaction(TouchType::Move,
PropagationPhase::Bubbling,
TouchResponse::StartTracking));