I'm looking for a way to draw a circle shaped window - i've been nosing
through the doc's and I found that wxFrame inherited from
wxTopLevelWindow... which has a setShape function.
If you haven't already, you might want to look at the ShapedWindow
demo (Miscellaneous-->ShapedWindow in the Python demo) in the Python
demo. This is downloadable from Redirecting....
I'm not keen on using a bitmap to get the shape. Is it possible to make
a circle shaped wxRegion without too much messing about, and maybe even
a doughnut shaped region?
I don't know if there is another way than working with BitMaps in this
case. But you can just draw a circle by code and apply a circle-mask
to it. As for the donut shape, I'm not sure, but I maybe two masked
circles with different radius together with a call to
Region.SubtractRegion would do it (and RegionFromBitmap applied to the
two circle bitmaps first of course)?
I'm using Linux with the GTK+ wxPython... the docs said windows and gtk
both allow shaped windows.
Yep. And OS X as well. But there is a minor coding difference,
documented in the ShapedWindow:
if wx.Platform == "__WXGTK__":
# wxGTK requires that the window be created before you can
# set its shape, so delay the call to SetWindowShape until
# this event.
self.Bind(wx.EVT_WINDOW_CREATE, self.SetWindowShape)
else:
# On wxMSW and wxMac the window has already been created,
so go for it.
self.SetWindowShape()
//Jonatan
ยทยทยท
On Thu, 30 Dec 2004 18:00:28 +0000, Tim Churchard <thespacemonkey66@yahoo.co.uk> wrote: