def GetItemRightImagesBBox(self, item):
rightimages = item.GetRightImages()
if len(rightimages) > 0:
w, h = self.GetClientSize()
total_h = self.GetLineHeight(item)
r_image_w, r_image_h = self._imageListRight.GetSize(rightimages[0])
bbox_width = (r_image_w + 4) * len(rightimages) + 4
bbox_height = r_image_h + 8
bbox_x = w - bbox_width
bbox_y = item.GetY() + ((total_h > r_image_h) and [(total_h-r_image_h)/2] or [0])[0]
return wx.Rect(bbox_x, bbox_y, bbox_width, bbox_height)
return None
评论列表
文章目录