# Image and Text in TkButton?

**URL:** <https://www.ruby-forum.com/t/image-and-text-in-tkbutton/49370>\
**Category:** Ruby\
**Created:** [December 2, 2005, 11:56pm UTC](https://www.ruby-forum.com/t/image-and-text-in-tkbutton/49370 "2005-12-02T23:56:05Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![fkc\_email-news](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/3d9bf3/32.png) [@fkc\_email-news](https://www.ruby-forum.com/u/fkc_email-news)\
**Post date:** [December 2, 2005, 11:56pm UTC](https://www.ruby-forum.com/t/image-and-text-in-tkbutton/49370/1 "2005-12-02T23:56:05Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![fkc\_email-news](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/3d9bf3/32.png) [@fkc\_email-news](https://www.ruby-forum.com/u/fkc_email-news)\
**Post date:** [December 3, 2005, 8:57am UTC](https://www.ruby-forum.com/t/image-and-text-in-tkbutton/49370/2 "2005-12-03T08:57:44Z")

</div>

From: Forrest C. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
Subject: [tk] Image and Text in TkButton?  
Date: Sat, 3 Dec 2005 07:52:31 +0900  
Message-ID: [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

> ```
> 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).
