shapedwindow + 2.9.3 + agw.aui = where's its edge?

Yet more 2.9.3 visual arcana...sorry.

I'm using a frame with the style wx.FRAME_SHAPED and using a custom
shape to create a shaped popup frame. The bitmap for the shape has a
gradient. The popup occurs against a notebook page, either
wx.aui.AUINotebook or agw.AUINotebook. I'd prefer to use
agw.AUINotebook to fix a frozen layout issue that Robin just helped me
with in another thread. However, there is a small visual problem...

- On 2.8.10, using agw.AuiNotebook, the popup has a thin grey edge
outlining it. Good.
- On 2.9.3, using aui.AUINotebook, the popup also has the a thin
grey edge. Good.

- But on 2.9.3 using agw.aui.AUINotebook--which is the combination of
version and widget I want--the popup only has the edge on the left and
top sides. The bottom has no edge/outline, and since it is white in
that part of the popup, it bleeds into the background. Not good.

Why should the shaped frame's appearance be different if I am using
agw's or aui's notebook on 2.9.3 (but not on 2.8.10)? Does it have to
do with aui being C++ and agw.aui being Python? And if so, why's
that? Is there a way to get around this?

Thanks,
Che

- On 2.8.10, using agw.AuiNotebook, the popup has a thin grey edge
outlining it. Good.
- On 2.9.3, using aui.AUINotebook, the popup also has the a thin
grey edge. Good.

CORRECTION: Sorry, it turns out it doesn't matter whether I use
aui.AUINotebook or agw.auiNotebook... in both cases on 2.9.3 it lacks
the grey border. On 2.8.10 it has it in either case.

So it seems to be something about 2.9.3 and the wx.FRAME_SHAPED
setting on Windows?

Thanks,
Che

I'm not sure I fully understand your description of the problem, is it that the content seems to be shifted with respect to the shape? If so then do you create the frame with or without the default styles that will give it a caption bar?

BTW, I've found that giving yourself a way to toggle with window shape on and off is a good way to debug positioning problems. It gives you an easy way to compare the position of the shape with the position of the drawn content. For example in the demo it uses the left-dclick event.

···

On 4/27/12 1:17 PM, C M wrote:

- On 2.8.10, using agw.AuiNotebook, the popup has a thin grey edge
outlining it. Good.
- On 2.9.3, using aui.AUINotebook, the popup also has the a thin
grey edge. Good.

CORRECTION: Sorry, it turns out it doesn't matter whether I use
aui.AUINotebook or agw.auiNotebook... in both cases on 2.9.3 it lacks
the grey border. On 2.8.10 it has it in either case.

So it seems to be something about 2.9.3 and the wx.FRAME_SHAPED
setting on Windows?

--
Robin Dunn
Software Craftsman

I'm not sure I fully understand your description of the problem, is it that
the content seems to be shifted with respect to the shape? If so then do
you create the frame with or without the default styles that will give it a
caption bar?

BTW, I've found that giving yourself a way to toggle with window shape on
and off is a good way to debug positioning problems. It gives you an easy
way to compare the position of the shape with the position of the drawn
content. For example in the demo it uses the left-dclick event.

I don't think it is a problem with the content (the actual image)
being shifted relative to the frame, because I tried the toggling you
mentioned and the image is well within the rectangle that represents
the frame and it is not shifting. No, the lower and right
borders/edges of the image are just not drawn when SetShape() is used,
but are visible when that is off.

Che

Ok, then I guess the next step is to make a small sample that shows the problem so I can see it for myself. Also, does it only happen when AUI is involved?

···

On 5/1/12 11:06 AM, C M wrote:

I'm not sure I fully understand your description of the problem, is it that
the content seems to be shifted with respect to the shape? If so then do
you create the frame with or without the default styles that will give it a
caption bar?

BTW, I've found that giving yourself a way to toggle with window shape on
and off is a good way to debug positioning problems. It gives you an easy
way to compare the position of the shape with the position of the drawn
content. For example in the demo it uses the left-dclick event.

I don't think it is a problem with the content (the actual image)
being shifted relative to the frame, because I tried the toggling you
mentioned and the image is well within the rectangle that represents
the frame and it is not shifting. No, the lower and right
borders/edges of the image are just not drawn when SetShape() is used,
but are visible when that is off.

--
Robin Dunn
Software Craftsman