When you skin a button (and certain other widgets), you can control the amount of pixels on top, left right and bottom to remain intact. Those pixels do not scale when the widget is resized. The rest of the pixels inside the widget scale as normal. This is what keeps button borders from scaling horizontally or vertically and distorting, creating ugly edges.

This example should show you what I mean:
http://www.ensomniac.com/pygtk/button_example8.jpg

Ryan






John Finlay wrote:
Ryan Martin wrote:
Hey Guys

For all intensive purposes, an eventBox can have widgets packed into it as I need and it can also have the background set as a style property ala "bg_pixmap[NORMAL] = 'something.png'". My problem is that the background needs to stretch, not tile. Like this:

http://www.ensomniac.com/pygtk/button_example3.jpg

When looking at the image above, please consider that I need to pack widgets inside the blue graphic area. That is why I need to use some form of container. I can't use an image widget, I can't use anything that won't let me pack widgets inside the graphic area.

The reason I initially decided to go with a button was because I knew I could skin it (it has advanced skinning functionality allowing you to stretch the pixmap while leaving the borders of the graphic intact) and it could act as a container for other widgets. The problem with using a button is that each time you hover over the main container button, it steals all of the events that I want to go to the child widgets. My initial post was looking for ideas on how I could disable the main button from events and just use it as a graphic container for my child widgets which would still need to work as expected. This has proven to be impossible?
<snip>

What is the advanced skinning functionality of a Button? This is something I'm not aware of.

John


--
Ryan Martin
*Industrial Light + Magic
*Assistant Technical Director
cell: 973-632-1417 / desk: 415-746-2117

*
*
_______________________________________________
pygtk mailing list   [email protected]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/

Reply via email to