#328 Tooltip font, msgcat namespace


Leaving BWidget, I was looking to the tktooltip package. Here are two comments:

1) Tooltip font
Currently, the default font for labels is used as tooltip font.
This might not be the desired font.
Since Tk8.5, there is the special font "TkTooltipFont" containing the current tooltip font which might be used.
Possible code from BWidget:
if {$::tcl_version >= 8.5} {
set fontdefault TkTooltipFont
} elseif {$Widget::_aqua} {
set fontdefault {helvetica 11}
} else {
set fontdefault {helvetica 8}
label -font $fontdefault

2) msgcat namespace
IMHO, the use of msgcat within tooltips is half baken:
- the namespace where msgcat::mc is called should be the namespace of the caller and not ::tooltip
- there are no parameters allowed to" msgcat::mc"

- save the caller namespace on tooltip creation for a later msgcat call
- add a "--" option to the arguments to stop argument parsing
- Allow to have multiple arguments after the message key.
Save it as list and pass it to msgcat as arguments.

Possible msgcat call with namespace and arguments
namespace eval $ns [concat ::msgcat::mc $lkey]

I would volonter to submit a patch for the two issues if this sounds reasonable

- Harald


Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks