I add two buttons into dialog->vbox ,then click one to remove the other,but after remove the other,the dialog size not change to size which just is suit for a button. I even use gtk_widget_set_size_request(dialog,width,height),it seem that only when width and height greater than orginal dialog size,dialog change bigger,but when set height and width smaller than orginal dialog size,it do nothing,there is still blank area in the dialog which used for the other button before. code below
#include <gtk/gtk.h> #define A &argc,&argv #define GW GtkWidget* #define GB gtk_button_new_with_label("xxx") #define BP gtk_box_pack_start GW dialog; GW b; GW b1; void yes(GtkWidget* gtkwidget,gpointer data) { gtk_container_remove(GTK_CONTAINER(GTK_DIALOG(dialog)->vbox),b1); gtk_widget_show_all(dialog); } int main (int argc, char *argv[]) {gtk_init(A); dialog=gtk_dialog_new(); b= GB ; b1= GB ; BP (GTK_BOX(GTK_BP (GTK_BOX(GTK_DIALOG(dialog)->vbox),b,FALSE,FALSE,0); BP (GTK_BOX(GTK_BP (GTK_BOX(GTK_DIALOG(dialog)->vbox),b1,FALSE,FALSE,0); gtk_widget_show_all(dialog); g_signal_connect(G_OBJECT(b),"clicked",G_CALLBACK(yes),b1); gtk_main(); return ; } help me! ___________________________________________________________ 雅虎1G免费邮箱百分百防垃圾信 http://cn.mail.yahoo.com/ _______________________________________________ maemo-developers mailing list maemo-developers@maemo.org https://maemo.org/mailman/listinfo/maemo-developers