The Z-order of the ogl components, seems to be their creation order.
(btw Interesting to know how to change the Z-order?)
You probably have to change the order in the diagram's shape list.
But now I noticed a funny thing,
when changing the color of an ogl.CircleShape,
while it is hidden under another shape on the same canvas:
If I change the color in the official way, like this
dc = wx.ClientDC(frame.Shape_Container)
frame.Shape_Container.PrepareDC(dc)
shape.SetBrush(wx.WHITE_BRUSH)
frame.Shape_Container.Redraw(dc)
I don't see anything.
But before someone on this list kindly gave me this official manner,
I found out there's another way, to reforce a redraw:
(btw much simpeler
shape.SetBrush(wx.GREEN_BRUSH)
shape.Flash()
I see the shape, even if it's hidden behind another shape.
Much nicer for my situation, because I'm interested in changes.
So now I've 2 questions:
1. is it allowed to use Flash() to force a redraw ?
2. why this different behavior ?
Flash is meant as a way to highlight a shape. Take a look at the code. It actually draws it twice, once with a logical function of wx.INVERT and once with wx.COPY. If this is what you want then that is fine, but keep in mind that if there are overlapping shapes then this single shape redraw can result in the layers getting messed up.
···
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!