just create a GtkImage and add() it to the Button. The point I think is that specialised code to create child widgets by the Button itself is not needed when users can just set up the child they want and add it in.
– underscore_d
Ok, I get it . I just needed to set it like this : gtk_button_set_child (GTK_BUTTON (button), image); where button is GtkButton and image is a GtkImage. Thanks . That was fast .
– Placeholder
Better to gtk_container_add (GTK_CONTAINER (button), image) imo, just looks more right.
– underscore_d
gtk_container_add() it's deprecated too in gtk4
– Placeholder
We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.OkRead more
GtkImage
andadd()
it to theButton
. The point I think is that specialised code to create child widgets by theButton
itself is not needed when users can just set up the child they want and add it in. – underscore_dgtk_button_set_child (GTK_BUTTON (button), image);
where button is GtkButton and image is a GtkImage. Thanks . That was fast . – Placeholdergtk_container_add (GTK_CONTAINER (button), image)
imo, just looks more right. – underscore_dgtk_container_add()
it's deprecated too in gtk4 – Placeholdergtk_button_set_child()
– underscore_d