in reply to [Tkx] Tk's Balloon translation

zentara gave you the Tk nomenclature for the feature you seek in his reply. In Tkx nomenclature this feature is called "tooltip" and not "balloon".

Quoting using Tcl packages from Tkx::Tutorial:

"When the Perl application starts up and loads Tkx, the only functions available in the Tkx:: namespace are those commands provided by core Tcl/Tk."
and that additional commands can be loaded hence you need to load the tooltip utility and provide it to "Tkx::package_require()".

I am not familiar with Tkx myself, but I suggest that you read Tkx::Tutorial and go through CPAN too.


Excellence is an Endeavor of Persistence. Chance Favors a Prepared Mind.

Replies are listed 'Best First'.
Re^2: [Tkx] Tk's Balloon translation
by zentara (Cardinal) on Feb 21, 2010 at 17:10 UTC
    Doh! You are right. BTW Gtk2 calls them tooltips as well, so forget about calling them balloons, unless for educational purposes within Tk. ! :-)

    I'm not really a human, but I play one on earth.
    Old Perl Programmer Haiku

      Ouh, I just forgot to post it! I I found how to write it, thanks a lot!
      Here is an example :

      use Tkx; Tkx::package_require('tooltip'); Tkx::namespace_import("::tooltip::tooltip"); my $mw = Tkx::widget->new("."); my $nameDTDlbl = $mw->new_ttk__label(-text => "The following entry wid +get got a tooltip :"); $nameDTDlbl->g_grid( -column => 0, -row => 0, -sticky => "we", -pady=> +5); my $nameDTDcase= $mw->new_ttk__entry(-width => 35,); $nameDTDcase->g_grid( -column => 0, -row => 1, -sticky => "w", -padx=> +10, -pady => "0 3"); Tkx::tooltip($nameDTDcase, "Example : \"tei_corpus.dtd\""); Tkx::MainLoop();