<br>To totally not answer your question, check out - <a href="http://pythoncard.sourceforge.net">pythoncard.sourceforge.net</a> <br>
It's the Visual Basic Userform IDE of wxPython. :)<br>
<br><div><span class="gmail_quote">On 7/1/05, <b class="gmail_sendername">Adam Bark</b> &lt;<a href="mailto:adam.jtm30@gmail.com">adam.jtm30@gmail.com</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div><span class="e" id="q_104cd2204544dd7c_0"><span class="gmail_quote">On 6/26/05, <b class="gmail_sendername">Adam Cripps</b> &lt;<a href="mailto:kabads@gmail.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
kabads@gmail.com</a>&gt; wrote:
</span>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
On 6/25/05, Adam Bark &lt;<a href="mailto:adam.jtm30@gmail.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">adam.jtm30@gmail.com</a>&gt; wrote:<br>&gt; Thanks for the info Adam I just seem to be having a problem with the panel
<br>&gt; size it greys out nearly all the image. Ideally I would like to make the
<br>&gt; panel transparent but I can't work out how to do that.<br>&gt;<br>&gt;<br>&gt; On 6/25/05, Adam Cripps &lt;<a href="mailto:kabads@gmail.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">

kabads@gmail.com</a>&gt; wrote:<br>&gt; &gt; On 6/25/05, Adam Bark &lt;
<a href="mailto:adam.jtm30@gmail.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">adam.jtm30@gmail.com</a> &gt; wrote:<br>&gt; &gt; &gt; Is it possible to put controls into a shaped window in wxPython. I have
<br>&gt; &gt; &gt; tried putting a button on the demo and it becomes the exact size and
<br>&gt; shape<br>&gt; &gt; &gt; of the window. Also when I tried to bind it to an action it wouldn't<br>&gt; even<br>&gt; &gt; &gt; start.<br>&gt; &gt; &gt;<br>&gt; &gt; &gt;&nbsp;&nbsp;Adam<br>&gt; &gt; &gt;<br>&gt; &gt;<br>&gt; &gt; I'm working through something similar myself at the moment.
<br>&gt; &gt;<br>&gt; &gt; Try adding a wx.Panel to the frame and then the button to the panel.<br>&gt; &gt; You can position them through pos parameter, but it should default to<br>&gt; &gt; the top left of the panel and have a good size if you use
<br>&gt; &gt; button.SetSize(button.GetBestSize())<br>&gt; &gt;<br>&gt; &gt; HTH<br>&gt; &gt;<br>&gt; &gt; Adam<br><br>Adam - how much code do you have? Why not post it either here or the<br>wxpython-users list (to which I'm also subscribed) and we can take a
<br>look.<br><br>Adam<br><br>--<br><a href="http://www.monkeez.org/" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://www.monkeez.org</a><br>PGP key: 0x7111B833</blockquote></span></div>
<br>
I tried posting to the wxpython-users list but I'm not sure it worked nobody replied anyway.<br>
Here's my test script:<br>
<br>
import wx<br>
<br>
class Frame(wx.Frame):<br>
&nbsp;&nbsp;&nbsp; def __init__(self):<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; wx.Frame.__init__(self, None, -1, &quot;Shaped Window&quot;,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
style =<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
wx.FRAME_SHAPED<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp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&nbsp;&nbsp;&nbsp; w, h = self.bkground.GetWidth(), self.bkground.GetHeight()<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self.SetClientSize((w, h))<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self.Bind(wx.EVT_WINDOW_CREATE, self.SetWindowShape)<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; panel = Panel(self, w, h)<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; panel.Show()<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; dc = wx.ClientDC(self)<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; dc.DrawBitmap(self.bkground, 0,0, True)<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>
&nbsp;&nbsp;&nbsp; def SetWindowShape(self, evt):<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # Use the bitmap's mask to determine the region<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; r = wx.RegionFromBitmap(self.bkground)<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self.hasShape = self.SetShape(r)<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>
&nbsp;&nbsp;&nbsp; def OnPaint(self, event):<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; dc = wx.PaintDC(self)<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; dc.DrawBitmap(self.bkground, 0,0, True)<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>
&nbsp;&nbsp;&nbsp; def OnMouseMove(self, evt):<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if evt.Dragging() and evt.LeftIsDown():<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; x, y = self.ClientToScreen(evt.GetPosition())<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; fp = (x - self.delta[0], y - self.delta[1])<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self.Move(fp)<br>
<br>
class Panel(wx.Panel):<br>
&nbsp;&nbsp;&nbsp; def __init__(self, parent, width, height):<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; wx.Panel.__init__(self, parent, -1, size=(width, height))<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; button = wx.Button(self, -1, &quot;hello&quot;)<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; button.SetSize(button.GetBestSize())<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self.SetSize((width, height))<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #print dir(self)<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>
if __name__ == &quot;__main__&quot;:<br>
&nbsp;&nbsp;&nbsp; app = wx.PySimpleApp()<br>
&nbsp;&nbsp;&nbsp; frame = Frame()<br>
&nbsp;&nbsp;&nbsp; frame.Show()<br>
&nbsp;&nbsp;&nbsp; app.MainLoop()<br>
<br>
Thanks.<br><span class="sg"><span>
Adam.</span>

</span><br>_______________________________________________<br>Tutor maillist &nbsp;- &nbsp;<a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:Tutor@python.org">Tutor@python.org</a><br><a onclick="return top.js.OpenExtLink(window,event,this)" href="http://mail.python.org/mailman/listinfo/tutor" target="_blank">
http://mail.python.org/mailman/listinfo/tutor</a><br><br><br></blockquote></div><br><br><br>-- <br>'There is only one basic human right, and that is to do as you damn well please.<br>And with it comes the only basic human duty, to take the consequences.'