Hi,
I've some problems to change an image on a button.
See the example :
gtk_button_set_image(GTK_BUTTON(theButton), ImageOne); // ok
gtk_button_set_image(GTK_BUTTON(theButton), ImageTwo); // ok
gtk_button_set_image(GTK_BUTTON(theButton), ImageOne); // ImageOne
doesn't appear !
Thanks !
__
Thanks, but how can I "ref it or sink it" ?
Guillaume
Ed Catmur a écrit :
> Guillaume Charhon writes:
>> I've some problems to change an image on a button.
>> See the example :
>>
>> gtk_button_set_image(GTK_BUTTON(theButton), ImageOne); // ok
&g
But I have read everything and it doesn't work ! I've tested all example
from
http://developer.gnome.org/doc/API/2.0/gobject/gobject-The-Base-Object-Type.html#floating-ref
But the result is the same ! ImageTwo is destroyed.
Thanks.
Ed Catmur a écrit :
> Tristan Van Berkom writes:
Thanks for your answer, I've find a solution with
gtk_container_remove() and gtk_container_add()
But I must do a gtk_widget_show_all(pButton) !!!
Guillaume Charhon
David Nec(as (Yeti) a écrit :
> On Wed, Nov 15, 2006 at 10:40:06PM +0100, Guillaume Charhon wrote:
>
>>
Oh yes ! It works too !
David Nec(as (Yeti) a e'crit:
> On Thu, Nov 16, 2006 at 03:45:25PM +0100, Guillaume Charhon wrote:
>
>> I've find a solution with
>>
>> gtk_container_remove() and gtk_container_add()
>>
>> But I must do a gtk_wid
Hi,
I've some problem with the function g_object_set_data and g_object_get_data
When I do
guint i,j;
int test;
i = 4;
j = 6;
g_object_set_data(G_OBJECT(game->pButton[i][j]), "position_x",
GUINT_TO_POINTER(i));
test = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(game->pButton[i][j]),
"position_x"
But it's the same button :'( !
David Nečas (Yeti) a écrit :
> On Thu, Nov 23, 2006 at 08:18:42PM +0100, Guillaume Charhon wrote:
>
>> When I do
>>
>> guint i,j;
>> int test;
>> i = 4;
>> j = 6;
>>
>> g_object_set_data(G_O
gt; On Thu, Nov 23, 2006 at 08:37:06PM +0100, Guillaume Charhon wrote:
>
>> But it's the same button :'( !
>>
>
> Did you really check it's the same object (e.g., printed
> address, although this is not 100% if the object is
> destroyed meanwhile) a
But it's the same button :'( !
David Nec(as (Yeti) a écrit :
> On Thu, Nov 23, 2006 at 08:18:42PM +0100, Guillaume Charhon wrote:
>
>> When I do
>>
>> guint i,j;
>> int test;
>> i = 4;
>> j = 6;
>>
>> g_object_set_data(G_O
You were right, I've find the problem, the bouton was recreated in an
other function. So the first button with the data was erased...
Thanks you for your useful help!
Guillaume
Guillaume Charhon a écrit :
> I've checked the adresses, they are not the same.
> The second butt
10 matches
Mail list logo