Hi all, I am trying to using a button only with image from stock, but i cannot success, the button only show text like "Preferences" instead of showing image. Does anyone knows how to get button with only image?
I attached my code below ------------------snipet ---------------------- edit_name_button = gtk_button_new_from_stock(GTK_STOCK_PREFERENCES); /* edit_name_button = gtk_button_new_with_label(""); gtk_button_set_image(GTK_BUTTON(edit_name_button), gtk_image_new_from_stock(GTK_STOCK_PREFERENCES, GTK_ICON_SIZE_SMALL_TOOLBAR)); */ main->contactproperties_name_entry = gtk_entry_new(); gtk_entry_set_has_frame(GTK_ENTRY(main->contactproperties_name_entry), FALSE); gtk_entry_set_editable(GTK_ENTRY(main->contactproperties_name_entry), FALSE); gtk_button_set_relief (GTK_BUTTON(edit_name_button), GTK_RELIEF_NONE); /*3 items add to horizontal box */ gtk_container_add (GTK_CONTAINER(name_hbox), name_label); gtk_container_add (GTK_CONTAINER(name_hbox), main->contactproperties_name_entry); gtk_container_add (GTK_CONTAINER(name_hbox), edit_name_button); gtk_box_set_child_packing (GTK_BOX(name_hbox), name_label, FALSE, FALSE, 0, GTK_PACK_START); gtk_box_set_child_packing (GTK_BOX(name_hbox), edit_name_button, FALSE, FALSE, 0, GTK_PACK_END); /*add to vertical box*/ gtk_container_add (GTK_CONTAINER(vbox), name_hbox); gtk_box_set_child_packing (GTK_BOX(vbox), name_hbox, FALSE, FALSE, 0, GTK_PACK_START); ------------------snipet ----------------------
_______________________________________________ maemo-developers mailing list maemo-developers@maemo.org https://lists.maemo.org/mailman/listinfo/maemo-developers