wxpython tooltip at specific coordinates

2019-09-01 08:33发布

I have seen lots of similar questions and those answers are what has gotten me this far.

I have an application where all all object are created via DC, so they are all all drawn. (I have had much experience with sizers and 99% of the time sizers ROCK but in this case DC is the best answer.) So I want to have a tooltip for each element that is drawn and in the case the screen is refreshed and the element is drawn in a different location the tooltip should also move. My first attempt was with setting a wx.Rect for each drawn item, but I ran into a "hang" situation. If i was on the the right track track I will attach a code sample but if I should be barking up another tree please let me know before I pull anymore of this hair out my head!!!!

1条回答
神经病院院长
2楼-- · 2019-09-01 08:51

You should try BalloonTip

http://wxpython.org/Phoenix/docs/html/lib.agw.balloontip.html

It creates a new Frame for the tooltip and sets it according to coordinates of the object.

查看更多
登录 后发表回答