From: <no...@tc...> - 2024-05-05 13:33:57
|
Automated mail by fx, on behalf of no...@tc... Ticket Change [a0f553d97c39ddbabc3b0a88ab8f3dc017cbb89dfc1ebd7cba1817ad738117ea] [add tooltip image support] By aku For Tklib On 2024-05-05T13:24:25.311 Details https://core.tcl-lang.org/tklib/tinfo?name=a0f553d97c39ddbabc3b0a88ab8f3dc017cbb89dfc1ebd7cba1817ad738117ea Ticket https://core.tcl-lang.org/tklib/tktview/2970577fffffffffffffffffffffffffffffffff Changed Fields assignee: aku closer: nobody comment: 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 } login: aku severity: Minor ------------------------------------------------------------ See Tcl/Tk development @ http://core.tcl-lang.org/ ------------------------------------------------------------ |