Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Library : Other (not classified elsewhere) » How to change the ZOrder of childcontrols at runtime?
Re: How to change the ZOrder of childcontrols at runtime? [message #35597 is a reply to message #35595] Sat, 03 March 2012 11:29 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
slashupp wrote on Sat, 03 March 2012 04:07

I have a window with dynamically created childcontrols on it.
Some of them overlap and I want to bring the bottom one to the top.
How do I do this?

[edit]

What I found that works is to removechild() and then add() again,
but this does not seem right. What is the correct way?



Well, it is a correct way.

You are however not required to removechild first and in fact it is better not to do so (U++ can optimize the process if parent does not change, eventual focus stays).

Also note there is 'insafter' parameter to AddChild and there is also AddChildBefore method.

Anyway, plain simple serie of 'Add' for all child widgets in order you need should work just fine.

Or to bring any widget on top, just Add it again.

Mirek

[Updated on: Sat, 03 March 2012 11:30]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Drawing with masks
Next Topic: Uniq blocking with multiple users logged into same machine
Goto Forum:
  


Current Time: Fri Mar 29 07:30:10 CET 2024

Total time taken to generate the page: 0.01462 seconds