[Xfc-dev] xfc questions

Xavier Otazu xotazu at cvc.uab.es
Sat Aug 20 00:23:35 CEST 2005


 	Hi!

>>	The problem appears when I want to change the button image from
>>MEDIA_PLAY to MEDIA_PAUSE. I use the set_image() method, but as you
>>tell in the tutorial it is mandatory to previously define the label for
>>the button.
>>
>Where do I say this exactly... it sounds wrong. You don't have to define
>a label. If your using Glade you should be able to delete the default
>label for the button you add, leaving the label entry box empty. Then
>the label proerty wont be set and the lable widget wont be created when
>libglade creates the button widget.
>
>Jeff.

I do not define the label on Glade, and as you tell, it works fine and the 
button does not allocate space for this label. But in some places of my 
code I need to change button image.

In the xfc-4.3/docs/reference/html/classXfc_1_1Gtk_1_1Button.html#z601_11 
html file of documentation of void Xfc::Gtk::Button::set_image (Widget & 
image) function, you tell :

void Xfc::Gtk::Button::set_image (Widget &image)

Set the image of the button to the given widget.

Parameters:
     	image 	The Image you want the button to display.

For this method to work the button label must be set first.



I tried not to set the label prior to calling the set_image() function, 
but the image on the button does not change. I have to call the 
set_label() function to change the image of an already existing Button.

cheers

Xavier



More information about the Xfc-dev mailing list