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
Contributor
Posts: 30
Registered: ‎05-18-2013
My Device: Non-BlackBerry user
My Carrier: Non

Is there a z-depth value in Cascades QML Components?

Hi all,

 

i tried to make an animation in Cascades QML.

but i found that there was no z-depth value in controls.

did i do anything stupid ? or Cascades did?

Developer
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10
My Carrier: none

Re: Is there a z-depth value in Cascades QML Components?

The z-depth is implicit in the order of the children of a given component. Basically if you start from the root component, there's a tree of child containers and components, and the z-depth is determined by where the item is in the tree. At any given level, the first child is lowest in z-order (behind the others) and the last child is highest (in front of the others). If one container lies in front of another, then all of its children are effectively in front of (higher z-order) the children of the other container.

Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!
Contributor
Posts: 30
Registered: ‎05-18-2013
My Device: Non-BlackBerry user
My Carrier: Non

Re: Is there a z-depth value in Cascades QML Components?

yes, i know that.

but now, if i wanna arrange z value in the run-time, what do i do?

in QtQuick, every component has a exlipict z value, so we can change the value in run-time to control where it should be displayed, in the front or back.

but in Cascades, i have no idea about this.

can u give me any idea?

 

Highlighted
Contributor
Posts: 30
Registered: ‎05-18-2013
My Device: Non-BlackBerry user
My Carrier: Non

Re: Is there a z-depth value in Cascades QML Components?

hi all, i have found solution for this.

there is a method named "swap" in control Container.

u can use it to swap two children's position in the Container.

so, if u wanna change the z depth in run-time, call this method, and sort the children of the container.

that's all.