CustomToolTip.py 文件源码

python
阅读 21 收藏 0 点赞 0 评论 0

项目:beremiz 作者: nucleron 项目源码 文件源码
def SetToolTipPosition(self, pos):
        """
        Set tool tip position
        @param pos: New tool tip position
        """
        # Get screen size to prevent tool tip to go out of the screen
        screen_width, screen_height = wx.GetDisplaySize()

        # Calculate position of tool tip to stay in screen limits
        tip_width, tip_height = self.GetToolTipSize()
        self.SetPosition(wx.Point(
            max(0, min(pos.x, screen_width - tip_width)),
            max(0, min(pos.y, screen_height - tip_height))))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号