Urgent regarding resizing of boxs



Hi All,
 
I am facing a problem in gtk hbox and vbox widgets and i have to resolve this issue as soon as possible.
Please let me know if any one has some inputs--
 
I am having following code to make a GUI for my application  and I need to resize my windows to utilize all
space i don't want any gaps inbetween the hboxs and vboxs but these is lots of space wasting.
--
I am using following code.. I attached the figure where i am getting lot of space between databoxs which are
packed into a hboxwidget
 
so basically i did following
 
vbox
___________________
|      hbox            hbox|
|                                |
|        hbox                 |
|__________________ |
 
and inside each hbox couple of vboxes are combined.....
 
 GtkWidget *box_main;
 GtkWidget *Hbox_main;
 GtkWidget *table[6];      
 GtkDataboxGraph *graph;

 GtkWidget *button; 
 GtkWidget *hbox1;
 GtkWidget *hbox2;
 GtkWidget *hbox3;
 GtkWidget *vbox1;
 GtkWidget *vbox2;
 GtkWidget *vbox3;

 GtkWidget *labelBox;

 GtkWidget *label;
 GtkWidget *quitbox;
 int which;
  
 //GtkWidget separator;
 gint i;
 gint node_id;

 gint signal_idle = 0;
 GtkWidget *separator;
 box_main = gtk_vbox_new(FALSE, 0);

 Hbox_main = gtk_hbox_new(FALSE, 0);
 
  gtk_container_add( GTK_CONTAINER(window), box_main);
 
 vbox1 = gtk_vbox_new(FALSE, 0); 
 hbox1 = gtk_hbox_new(FALSE, 0);

 /* Create the databoxes */
 for( i = 0; i<6; i++)
 {
  /* Create a GtkDatabox widget along with scrollbars and rulers */
         gtk_databox_create_box_with_scrollbars_and_rulers (&box[i], &table[i],
            FALSE, FALSE, FALSE, FALSE);
  gtk_box_pack_start (GTK_BOX (vbox1), table[i], TRUE, TRUE, 0);
  separator = gtk_hseparator_new ();
  gtk_box_pack_start (GTK_BOX (vbox1), separator, FALSE, FALSE, 0);
 }

 gtk_box_pack_start(GTK_BOX( hbox1), vbox1, TRUE, TRUE, 0);
 gtk_container_set_border_width(hbox1,0);
 gtk_box_pack_start(GTK_BOX( Hbox_main), hbox1, TRUE, TRUE, 0); 
 gtk_container_set_border_width(Hbox_main,0);
        // To make cross lines on the boxes

 hbox2 = gtk_hbox_new(TRUE, 0);
 vbox2 = gtk_vbox_new(FALSE, 0);
 labelBox = labelBoxFunc();
 gtk_misc_set_alignment (GTK_MISC (labelBox), 0, 0);

     gtk_box_pack_end(GTK_BOX(vbox2), labelBox, TRUE, TRUE, 0);
 gtk_box_pack_end(GTK_BOX(hbox2), vbox2, TRUE, TRUE, 0);

 gtk_box_pack_start(GTK_BOX( Hbox_main), hbox2, TRUE, TRUE, 0);

 gtk_box_pack_start(GTK_BOX( box_main), Hbox_main, TRUE, TRUE, 0);

        /*Args are: homogeneous, spacing, expand, fill, padding */
 
       hbox3 = make_box (FALSE, 10, TRUE, FALSE, 0);

 gtk_box_pack_start (GTK_BOX (box_main), hbox3, TRUE, TRUE, 20); 

       gtk_widget_show (box_main);
 
The snap shot of the GUI is as follows --
 
Please let me know how i can resize the hbox and vboxs
 
Thanks and Regards,
Nisha

Attachment: gui.bmp
Description: Windows bitmap



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]