问题
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:
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.
来源:https://stackoverflow.com/questions/29059569/wxpython-tooltip-at-specific-coordinates