Cannot get this label to right justify



I cannot get a label to right justify for the
life of me! Could you please read this function
and tell me possibly why? Thanks. I've commented
the necessary areas.

GtkWidget *createFTPWindow(GtkWidget *window, gboolean type)
{
   GtkWidget *table, *tmp, *frame;
   table = gtk_table_new(10, 10, FALSE);
   
   tmp = gtk_label_new("Current Directory:");
   gtk_table_attach(GTK_TABLE(table), tmp, 0, 1, 0, 1, 
                    GTK_FILL, 0, 1, 1);
   gtk_widget_show(tmp);
   
   tmp = gtk_combo_new();
   gtk_widget_set_usize(tmp, 150, -1);
   gtk_table_attach(GTK_TABLE(table), tmp, 1, 10, 0, 1,
                    GTK_FILL, 0, 1, 1);
   gtk_widget_show(tmp);
   
   /* This is the label I want right-justified. However, it
      stays centered. I've tried attaching it to the table
      before and after attaching it to the table. */
   tmp = gtk_label_new("File Filter:");
   gtk_label_set_justify(GTK_LABEL(tmp), GTK_JUSTIFY_RIGHT);
   gtk_table_attach(GTK_TABLE(table), tmp, 0, 1, 1, 2,
                    GTK_FILL, 0, 1, 1);
   gtk_widget_show(tmp);

   tmp = gtk_entry_new();
   gtk_widget_set_usize(tmp, 50, -1);
   gtk_entry_set_text(GTK_ENTRY(tmp), "*.*");
   gtk_table_attach(GTK_TABLE(table), tmp, 1, 3, 1, 2,
                    GTK_FILL, 0, 1, 1);
   gtk_widget_show(tmp);
                    
   gtk_widget_show(table);
   frame = gtk_frame_new((type == LOCAL ? "Local Host" : "Remote
Host"));
   gtk_container_border_width(GTK_CONTAINER(frame), 5);
   gtk_container_add(GTK_CONTAINER(frame), table);
   
   return frame;    
}


-- 
+-----------------------------------------------------+
| Jeff "Shippy" Shipman     E-Mail: shippy@cs.nmt.edu |
| Computer Science Major    ICQ: 1786493              |
| New Mexico Institute of Mining and Technology       |
| Homepage: http://www.nmt.edu/~shippy                |
+-----------------------------------------------------+



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