Re: [gtk-list] Cannot get this label to right justify
- From: Charles Kerr <ckerr osserver1 nssl noaa gov>
- To: gtk-list redhat com
- Cc: shippy cs nmt edu, on ox nssl noaa gov
- Subject: Re: [gtk-list] Cannot get this label to right justify
- Date: Thu, 30 Mar 2000 17:55:21 -0600
Try gtk_misc_set_alignment (GTK_MISC(tmp), 1.0, 0.5);
cheers,
Charles
On Thu, Mar 30, 2000 at 04:54:05PM -0700, Jeff Shipman wrote:
> 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 |
> +-----------------------------------------------------+
>
> --
> To unsubscribe: mail -s unsubscribe gtk-list-request@redhat.com < /dev/null
>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]