Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#239 add tooltip image support

open
Jeffrey Hobbs
5
2010-03-15
2010-03-15
Rene
No

Tooltip can only display text. With the following code in tooltip::show we can also display images and bitmaps.
The user has to provide a valid image/bitmap instead of the message argument.

# Use late-binding msgcat (lazy translation) to support programs
# that allow on-the-fly l10n changes
if {[catch {set type [image type $msg]}]} {
$b.label configure -text [::msgcat::mc $msg] -justify left
} elseif {$type eq {bitmap}} {
$b.label configure -bitmap $msg -justify left
} else {
$b.label configure -image $msg -justify left
}

Discussion

  • Rene
    Rene
    2010-03-16

    patch for displaying images and bitmaps

     
    Attachments