PopupTransientWindow within a ScrolledWindow

Simon Kagwi simonkagwe at yahoo.com
Sat Jun 2 04:11:23 PDT 2007


Hi, 
I have a program that pops up a PopupTransientWindow
at the mouse position when a user left-clicks on a
ScrolledWindow (an OGL canvas). It works perfectly
when the window is not scolled but when it is scrolled
the positioning of the popup is incorrect. I have
attached screenshots of the behaviour both when
scrolled and unscrolled.

Here is how I am creating an instance of
PopupTransientWindow and showing it:

# c is the parent(wx.lib.ogl ShapeCanvas)
win = FlowEntry(c, wx.SIMPLE_BORDER, s)
pos = (x,y)#position clicked on
#pos = c.CalcUnscrolledPosition(pos)
pos = c.ClientToScreen(pos)
win.Position(pos, (0, 0))
win.Popup()

What might be the problem? Uncommenting the line with
CalcUnscrolledPosition does not solve the problem.


       
____________________________________________________________________________________
Choose the right car based on your needs.  Check out Yahoo! Autos new Car Finder tool.
http://autos.yahoo.com/carfinder/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not_scrolled..JPG
Type: image/jpeg
Size: 85136 bytes
Desc: 2837615029-not_scrolled..JPG
Url : http://lists.wxwidgets.org/pipermail/wxpython-users/attachments/20070602/4fa90b89/not_scrolled..jpeg
-------------- next part --------------
A non-text attachment was scrubbed...
Name: scrolled.JPG
Type: image/jpeg
Size: 79803 bytes
Desc: 1604116730-scrolled.JPG
Url : http://lists.wxwidgets.org/pipermail/wxpython-users/attachments/20070602/4fa90b89/scrolled.jpeg


More information about the wxpython-users mailing list