Hi,
I stumbled upon super tooltip while browsing wxPython docs&demos and wanted to use it in my app.
Since then I'm becoming more and more surprised with its code. So I just wanted to ask if the code is still maintained and considered 'live', so I could create a patch and send it (where?), hoping it will be included in future release, or should I just modify code in place because noone really cares about it anymore (in which case it should be marked as deprecated perhaps).
Issues I found so far:
1. Shadows and rounded corners are available on windows later than XP, so checking for an exact OS version restricts tooltip too much
2. Formatting of main body text is poor - only full text can be bolded, or link can be included at the beginning of line.
3. CalculateBestSize is almost a copy of OnPaint - a tiny change to the latter can make CalculcateBestSize fit within 2 lines instead of ~80.
4. Speaking about OnPaint - it's a terrible spaghetti code, spanning over 150 lines and taking care of text formatting (among other tasks), so if you want to change text formatting behaviour in a subclass, you need to copy full method to a subclass and change just relevant part of it.
5. Trick with enabling tooltip globally (by storing an attribute in wx.App) is nice, but that attribute is not checked when tooltip is shown, so if we disable tooltip while timer is running, it won't prevent it from being displayed. And since there's no 'legal' access to that attribute from outside the SuperToolTip class it's quite annoying.
6. There's a method 'DoShowNow()' for instant display of tooltip, but there's no 'DoHide()' nor 'Close()' method for instant closing it.
7. Tooltip window is actually being recreated each time it's being displayed, which (at first glance) looks like a waste - each time we need to recompute all formatting, best size & position, while it's rather unusual that tooltip instances change their contents (message & images).
I already coped with following points:
1., 3., 6. and partially with 2. (code now supports <b></b> and <i></i> tags, but I didn't take care about escaping the '<' character in any way so it can't be a part of tooltip).
Now I need to cope with 5. so I'm going to repeat myself - is there a need for improving SuperToolTip, or is BalloonTip or wx.TipWindow considered so much better that noone wants to spend his time on SuperToolTip anymore?
Best regards,
Adam Bielański.