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   |
 |
mirek
Messages: 14257 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
|
|
|
|
|
Goto Forum:
Current Time: Sun May 11 12:08:07 CEST 2025
Total time taken to generate the page: 0.02244 seconds
|