[maemo-developers] [maemo-developers] gtk dialog can not auto adjust
From: 程波 程 chengbobo807 at yahoo.com.cnDate: Fri Jan 13 08:18:35 EET 2006
- Previous message: [maemo-developers] Fixing osso-email, building a custom treeview model. The technique in demo format
- Next message: [maemo-developers] Maemo Wiki - Application Catalog.
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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/
- Previous message: [maemo-developers] Fixing osso-email, building a custom treeview model. The technique in demo format
- Next message: [maemo-developers] Maemo Wiki - Application Catalog.
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]