Forum: Ruby Image and Text in TkButton?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
430373cc99a1c2526b0651089ef11b35?d=identicon&s=25 fkc_email-news (Guest)
on 2005-12-02 23:56
(Received via mailing list)
How do you put both an image an text into a button.  It seems
Compound Image that shows up in google isn't supported either as a
class or option in ruby tk.  Using 1 click installer of latest stable
1.8 release.


Thanks

Forrest
E4f967492dbd03c526cc9b397e68021d?d=identicon&s=25 nagai (Guest)
on 2005-12-03 08:57
(Received via mailing list)
From: Forrest Chang <fkc_email-news@yahoo.com>
Subject: [tk] Image and Text in TkButton?
Date: Sat, 3 Dec 2005 07:52:31 +0900
Message-ID: <81vey7m7vv.fsf@yahoo.com>
>        How do you put both an image an text into a button.  It seems
> Compound Image that shows up in google isn't supported either as a
> class or option in ruby tk.  Using 1 click installer of latest stable
> 1.8 release.

'compound' option is supported by Tcl/Tk8.4 or later.
The version of Tcl/Tk libraries on one-click installer is 8.3.
So, you have to install Tcl/Tk8.4 or 8.5 and replace tcltklib.dll
which uses the libraries of Tcl/Tk8.4 or 8.5.
Or, pack an image label and a text label on the button,
and define event callbacks for both of the labels (e.g. change
option values of the labels and send the event to the button).
This topic is locked and can not be replied to.