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
New Contributor
Posts: 6
Registered: ‎07-15-2013
My Device: Z10 & Q10
My Carrier: EE

How to get height/width/position of any visual node after it rendered?

I am trying to make a draggable button which needs to flow through source to sink positions. The sink position is not fixed but depends on other elements. I can't find a way to get position of any node from window (0,0) even actual rendered height/width are changed from preferred size and that's also seems not possible to get.

Developer
Posts: 271
Registered: ‎05-29-2013
My Device: BlackBerry Z10
My Carrier: MTS

Re: How to get height/width/position of any visual node after it rendered?

Use LayoutUpdateHandler: https://developer.blackberry.com/cascades/reference/bb__cascades__layoutupdatehandler.html

It will let you to get the rect of the item.
-------------------------------------------------------------------------------
NSR Reader for BlackBerry 10 @NSRReader on Twitter
Me @xelfium on Twitter