[Gambas-user] Tooltip help using HTML.
Benoît Minisini
gambas at ...1...
Sat Jan 25 14:41:41 CET 2014
Le 25/01/2014 04:49, Sam a écrit :
> Hi all,
>
> I'm having a problem with the tooltips. It works fine with regular
> text but when I use HTML for a multi-line tooltip the results are not
> predictable. Most of the time an extra blank line shows up at the
> bottom. Seems like it might be wrapping if the last line is shorter (yes
> shorter).
>
> A code example looks like :
>
> Dim sHTML AS String
>
> sHTML &= "<html>"
> sHTML &= "<table cellpadding=1>"
> sHTML &= "<tr><td align=right>Note on</td><td align=left>G#/Ab</tr>
> sHTML &= "<tr><td align=right>Row</td><td align=left>44</tr>
> sHTML &= "<tr><td align=right>Velocity</td><td align=left>96</tr>
> sHTML &= "</table>"
> sHTML &= "</html>"
>
> gvEvents.Tooltip = sHTML
>
>
> It does not seem to matter if the "<html>" tag is included or not or
> if the attribute values are enclosed
> in single or double quotes. The table cells can have different colors
> or font sizes and works fine. Just a
> strange extra line at the bottom (not always). Any idea? I've tried
> numerous simple HTML snippets
> that work fine and wonder if it is just the fact of the <table> inside.
>
> I've been developing a MIDI app using the ALSA API which works well
> but I'm surprised there is
> not a wrapper already out there for Gambas, anyone already written one?
>
> The opaque structures and macros for hiding the actual implementation
> are a good design for C but not so nice for Gambas. I gave up on the
> timing callback thinking the callback cannot occur properly since they
> are on different threads. I have a separate player and a GUI that
> communicate via pipes, works good.
>
> Thanks for Gambas! I come home from a day of Java abstract
> frameworks, inversion of control, more
> and more bloat and just write stuff that is fun and actually works.
>
> Sam
HTML is not supported in tooltips at the moment.
It only partially works with gb.qt4 by chance, because of QT4 that has
automatic HTML detection that I can't disable.
Regards,
--
Benoît Minisini
More information about the User
mailing list