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
Trusted Contributor
Posts: 114
Registered: ‎05-09-2013
My Device: BB10 Z10
My Carrier: Virgin
Accepted Solution

QML: Changing component's display priority (layer)

Hello,

 

Is there a way of changing QML component's visual display order? For instance, If I added Container A, then Container B, but then I want to have Container A overlay Container B at some point (Assuming AbsoluteLayout)

 

Thanks!

Developer
Posts: 17,012
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: QML: Changing component's display priority (layer)

you can use variables for nearly everything and change them as required.
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Developer
Posts: 6,152
Registered: ‎07-05-2012
My Device: Playbook, Dev Alpha C, Z10 LE, Z30
My Carrier: Orange

Re: QML: Changing component's display priority (layer)

Yes there is you can use the Containers add, remove, replace and swap functions to rearrange the z-order which is what I think you are asking for.

 

http://developer.blackberry.com/native/reference/cascades/bb__cascades__container.html

 

 


If you've been helped click on Like Button, if you've been saved buy the app. Smiley Happy

Developer of stokLocker, Sympatico and Super Sentences.
Trusted Contributor
Posts: 114
Registered: ‎05-09-2013
My Device: BB10 Z10
My Carrier: Virgin

Re: QML: Changing component's display priority (layer)

Thanks! That did the trick. A little late in replying, but just to close off the thread with solution - I added the following code to the parent container that holds the two items that needed to be swapped... worked like a charm:

 

Container {
	onCreationCompleted: {
		swap(0,1) // makes sure the title bar is on top...
	}