# Using image as background for label

**URL:** <https://www.ruby-forum.com/t/using-image-as-background-for-label/79348>\
**Category:** Ruby-Gnome 2\
**Created:** [December 14, 2006, 1:27pm UTC](https://www.ruby-forum.com/t/using-image-as-background-for-label/79348 "2006-12-14T13:27:33Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Laurent\_Marzullo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/a183cd/32.png) [@Laurent\_Marzullo](https://www.ruby-forum.com/u/Laurent_Marzullo)\
**Post date:** [December 14, 2006, 1:27pm UTC](https://www.ruby-forum.com/t/using-image-as-background-for-label/79348/1 "2006-12-14T13:27:33Z")

</div>

Hello all,

I would like to know if there’s a way to use an image to fill the  
background  
of a label widget ? (Like the background attribute of the html tag

 or that fill the background of the page/table to a specific image.)

What I want to do is:

I create a Gtk::Table of 11 rows and 6 columns.  
The first row is for title of the differente columns (I use this because  
i’ve  
not renderer for a SpinButton for Gtk::TreeView). But, I would like to  
have the  
title of the column to be written in White and the background of each  
cell  
should be an image that fill the entire place for the label.

Tell me if I’m wrong, but if I use Gtk::Image, the image should be the  
exact  
size of the widget, isn’t it ? Or some gap will be display between each  
column  
of the table if the table is resized, no ?

I’ve tried Gtk::HtmlView, but this does not seem to work inside a  
Gtk::Table  
cell.

Any ideas guys ?  
Regards

Ps: If there’s no way, I will use a background color instead of a  
background  
image 🙂

±-------------------+

- Laurent Marzullo
- 

* * *

Take Surveys. Earn Cash. Influence the Future of IT  
Join [SourceForge.net](http://SourceForge.net)’s Techsay panel and you’ll get the chance to share  
your  
opinions on IT & business topics through brief surveys - and earn cash  
[http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV](http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV)
