If I have two sibling components, and I want to find out if one is on top of the other in the zorder, is this the correct way to do it?
if (getParentComponent()->getIndexOfChildComponent(other) > getParentComponent()->getIndexOfChildComponent(this))
If so, it would be nice if Component had a function for doing this.
jules
May 9, 2007, 6:12pm
2
Yes, that’d work.
You’re right, it would be a good method to add - it seems odd that I’ve never needed to do it before…
yanco
May 10, 2007, 8:26am
3
I have a similar question. How can I set the z-order of a Component directly (after it was created)? I know only about toFront() toBack() and toBehind() functions, but I was curious if there is a way to set exact value of z-order?
Y.
jules
May 10, 2007, 8:47am
4
No, I seem to remember there being a good reason for not setting the z-order directly. Can’t remember what it was though!..
yanco
May 10, 2007, 10:00am
5
I understand, anyways it can be done with toFront() and toBack() instead so it’s not such a big deal, I just wanted to know…
Thanks.
Y.