No.
In fact I want to use only one button and be able to switch the image
depending the status of the button, as you can found in some standard
behavior of MSword :
even number of click : STOCK_ADD item, then open a supplementary panel
odd number of click : STOCK_REMOVE item, then hide the supplementary panel

At the creation of the button, I use :
image = gtk.Image()
image.set_from_stock (gtk.STOCK_ADD, gtk.ICON_SIZE_BUTTON)
button = gtk.Button()
button.add (image)      
On the 'changed' callback, I need to change the stock item to STOCK_REMOVE
and the next time to STOCK_ADD.
        

regards



Yuri Pimenov wrote:
> 
> How about having two buttons in a box and hide()/show() them when needed?
> 
> PS. You'll want to put buttons in a gtk.SizeGroup if you want them to
> be the same size.
> 
> On 27/11/2007, awalter1 <[EMAIL PROTECTED]> wrote:
>>
>> Hi,
>> In the frame of my previous post, I want to substitute a stock item by
>> another one (switch from + to - and conversely).
>> I suppose that button.remove(image) should be the right way before
>> perform a
>> button.add(new_image), but how to get the parameter "image" that should
>> be a
>> widget.
>> if a perform a button.get_image(), the result is None !
>>
>> Thank you
>> --
>> View this message in context:
>> http://www.nabble.com/manipulate-image-from-a-gtk.Button-tf4880483.html#a13967036
>> Sent from the Gtk+ - Python mailing list archive at Nabble.com.
>>
>> _______________________________________________
>> pygtk mailing list   pygtk@daa.com.au
>> http://www.daa.com.au/mailman/listinfo/pygtk
>> Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
>>
> 
> -- 
> Yuri Pimenov
> _______________________________________________
> pygtk mailing list   pygtk@daa.com.au
> http://www.daa.com.au/mailman/listinfo/pygtk
> Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
> 
> 

-- 
View this message in context: 
http://www.nabble.com/manipulate-image-from-a-gtk.Button-tf4880483.html#a13969515
Sent from the Gtk+ - Python mailing list archive at Nabble.com.

_______________________________________________
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/

Reply via email to