Re: Tiling button background image



On Fri, 15 Aug 2008 09:57:31 +1000
Kevin Ryde <user42 zip com au> wrote:

"Veli Ogla Sungutay" <velisungutay gmail com> writes:

Another simple task. I have a button and I need to repeat the
background image horizontally. Just like we do in CSS
background: url(foo.jpg) repeat-x

At the X level background pixmaps are tiled horizontally and vertically,
per gdk_window_set_back_pixmap.  But I don't know how well that works
with widgets and their text.  A GtkButton (believe it or not!) is a
no-window widget, so you might have to stick it in a GtkEventBox to
confine the background to just the button.

You can also add anything to a button

$button->add($vbox);    # <- You can pack any widget inside a button!

So fill your $vbox anyway you want, like a combination of labels and images.

zentara

-- 
I'm not really a human, but I play one on earth.
http://zentara.net/Remember_How_Lucky_You_Are.html 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]