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++ Widgets - General questions or Mixed problems » How to set a child as top most Ctrl
How to set a child as top most Ctrl [message #45616] Thu, 17 December 2015 12:44 Go to next message
koldo is currently offline  koldo
Messages: 3377
Registered: August 2008
Senior Veteran
Hello all

I wanted to ask you how to set a child Ctrl as the top most visible one.

Is there a kind of SetChildIndex()?


Best regards
Iñaki
Re: How to set a child as top most Ctrl [message #45617 is a reply to message #45616] Thu, 17 December 2015 13:27 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13995
Registered: November 2005
Ultimate Member
koldo wrote on Thu, 17 December 2015 12:44
Hello all

I wanted to ask you how to set a child Ctrl as the top most visible one.

Is there a kind of SetChildIndex()?


Topmost visible is the last one. It is OK to insert/add Ctrl that is already somewhere, Ctrl code will remove it first. So the easiest way should be just to add it again:

dlg.Add(ctrl);

Mirek
Re: How to set a child as top most Ctrl [message #45621 is a reply to message #45617] Thu, 17 December 2015 14:51 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3377
Registered: August 2008
Senior Veteran
Thank you Mirek Smile

It works:
RemoveChild(&child);
Add(child);


Best regards
Iñaki
Re: How to set a child as top most Ctrl [message #45624 is a reply to message #45621] Thu, 17 December 2015 16:17 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13995
Registered: November 2005
Ultimate Member
Actually, I believe that RemoveChild is not even needed. In fact, there is even some optimization in AddChild that makes not using RemoveChild optimal.
Re: How to set a child as top most Ctrl [message #45639 is a reply to message #45624] Fri, 18 December 2015 08:19 Go to previous message
koldo is currently offline  koldo
Messages: 3377
Registered: August 2008
Senior Veteran
Ok, excellent.

Best regards
Iñaki
Previous Topic: dynamic scatterDraw in a GUI
Next Topic: How can DropList background color be set?
Goto Forum:
  


Current Time: Sat Jul 20 21:10:28 CEST 2024

Total time taken to generate the page: 0.03128 seconds