[wxPython-users] Can the balloontip be constrained to stay inside
the display ?
roee shlomo
roee88 at gmail.com
Wed Feb 27 06:29:04 PST 2008
Add this function to class BalloonFrame:
> def MakeSureAllVisible(self):
> displayRect =3D wx.GetClientDisplayRect()
> currentRect =3D self.GetRect()
> if currentRect.IsEmpty() or displayRect.IsEmpty():
> return False
> if currentRect.top < displayRect.top:
> currentRect.y +=3D displayRect.top - currentRect.top
> if currentRect.bottom > displayRect.bottom:
> currentRect.y +=3D displayRect.bottom - currentRect.bottom
> if currentRect.left < displayRect.left:
> currentRect.x +=3D displayRect.left - currentRect.left
> if currentRect.right > displayRect.right:
> currentRect.x +=3D displayRect.right - currentRect.right
> self.SetRect(currentRect)
> return True
Call it before calling self.Show(True) in BalloonFrame.__init__
On Wed, Feb 27, 2008 at 3:21 PM, f rom <etaoinbe at yahoo.com> wrote:
> Question about the balloontip (
> http://xoomer.alice.it/infinity77/main/BalloonTip.html )
>
> If you do not specifiy where it should appear it appears near the mouse.
> This is good. However when the mouse is close to the screen edge the
> balloontip may be displayed partially outside the screen and then the user
> can not click the x to close the balloontip. Can the balloontip be
> constrained to stay inside the display ?
>
> Kind Regards,
> joe
>
>
>
>
>
>
> ________________________________________________________________________=
____________
> Looking for last minute shopping deals?
> Find them fast with Yahoo! Search.
> http://tools.search.yahoo.com/newsearch/category.php?category=3Dshopping
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: wxPython-users-unsubscribe at lists.wxwidgets.org
> For additional commands, e-mail: wxPython-users-help at lists.wxwidgets.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.wxwidgets.org/pipermail/wxpython-users/attachments/200802=
27/a387dff4/attachment.htm
More information about the wxpython-users
mailing list