[pygtk] CellRendererButton, or how to pack a Button inside a TreeView

Neil Dugan pygtk at butterflystitches.com.au
Sun Sep 21 15:51:53 WST 2008


Walter Leibbrandt wrote:
> Hi,
> 
> I took the liberty of doing a quick search and found this: 
> http://propython.googlecode.com/svn/gui/chaveiro/eagle.py (class 
> _CellRendererButton). I don't know if/how it works, but that should get 
> you started. :)
> 
> Regards,
> 
> Walter
> 
> Federico wrote:
>> Hi all,
>> Is there a way to embed a Button inside a TreeView?
>> I've tried creating a custom CellRenderer but could not find the way
>> to paint the button inside it.
>> I'd like this button to have RELIEF_NONE until it is hovered, then
>> showing up as a normal prelit button.
>> Is this possible?
>>
>> Feel free to suggest a different solution and to ask for more
>> information if that's not clear :-)
>>
>> Thanks,
>> Federico

Thanks Walter Leibbrandt for the hint.  I too wanted to put a button 
in a listview.  Here is what I worked out.

Regards Neil.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: cellrendererbutton.py
Type: text/x-python
Size: 3834 bytes
Desc: not available
Url : http://www.daa.com.au/pipermail/pygtk/attachments/20080921/691e8a44/attachment.py 


More information about the pygtk mailing list