What I’m trying to do:
Im trying to make some cool looking components using the xypanel
What I’ve tried and what’s not working:
working so far but I don’t know how to move one component to the back or front
What I’m trying to do:
Im trying to make some cool looking components using the xypanel
What I’ve tried and what’s not working:
working so far but I don’t know how to move one component to the back or front
I believe that the components are listed in Z-order, from back to front, because add_component()
always appends the new component (places it at the highest subscript) and shows it in front of all the others.
With that in mind, here’s an (untested) idea:
get_components()
to get the panel’s list of components.The result would likely become visible the next time the panel gets redrawn, i.e., when the browser is idle.
Thanks for this
How do I rearrange the components?clear and then add them again in the order required?
That would certainly work.
Note that if there is no other object referring to a component, then clearing the list would remove the only reference to it, so Python would then destroy that component. To avoid this, you might want to make a copy of the list, before you clear it. Then you can add from that list, in any order you like.
The (untested) shortcut I was referring to was to use Python’s native list
support to rearrange the list in situ. I haven’t had a reason to try it, so far, so I don’t know whether it will work.
Yes, this is exactly the way!
I need some assistance regarding z-values…how do you control this?
I have a form which I want to be non-responsive to input while a background-task works.
How can I add a component as overlay instead of it adding itself together with everything else?
Or are there better methods of making the GUI unresponsive and displaying information to the user during background-tasks?
This should really be raised as a new topic. But the short answer is, yes, there can be better ways. For example: