[wxPython-users] Need for popup window to extend beyond bounds
of parent
Robin Dunn
robin at alldunn.com
Wed Jan 10 00:02:29 PST 2007
Jeffrey Barish wrote:
> In my StaticTextWithMenu class, both the StaticText and the popup ListCtrl
> are owned by the panel the StaticTextWithMenu is placed on. One
> possibility I have been exploring is to give the ListCtrl to the top-level
> Frame. That change does circumvent the clipping, but I will have to figure
> out how to position the ListCtrl relative to the StaticText on the panel.
You can find the position of the static text relative to the screen with
ClientToScreen().
> Also, the ListCtrl draws without a box around it on Linux (with
> wx.SIMPLE_BORDER)(on Windows the border still appears).
Yeah, I'm not sure why that style doesn't do anything on wxGTK, but it's
always been that way.
>
> The other approach I explored was a popup menu. That approach is
> wonderfully simple, but I can't find a way to position the popup menu. It
> needs to appear in a fixed position relative to the static text, not
> relative to the position of the mouse event.
>
> Am I missing something obvious?
If you don't need it to work on OS X you can try using a wx.PopupWindow
as the base.
--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!
More information about the wxpython-users
mailing list