Re: Bug in GTK 1.2.8?
- From: znm <znm china com>
- To: Stephen White <spwhite chariot net au>
- Cc: gtk-list gnome org
- Subject: Re: Bug in GTK 1.2.8?
- Date: Sat, 22 Jul 2000 15:43:08 +0800
Stephen White wrote:
> Setting right justify on labels doesn't seem to work... Below is a small
> program to demonstrate the problem.
>
> #include <gtk/gtk.h>
>
> int
> main(int argc, char *argv[])
> {
> GtkWidget *window, *box, *label, *entry;
>
> gtk_init (&argc, &argv);
>
> window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
>
> box = gtk_hbox_new (TRUE, 0);
> label = gtk_label_new ("freddie");
change the char string "freddie" to "freddie \n how are you!"
you'll find what is set_justify for.
>
> entry = gtk_entry_new ();
>
> // The line that doesn't work... should snuggle freddie up.
> gtk_label_set_justify (GTK_LABEL(label), GTK_JUSTIFY_RIGHT);
>
> gtk_box_pack_start (GTK_BOX(box), label, TRUE, TRUE, 0);
> gtk_box_pack_start (GTK_BOX(box), entry, TRUE, TRUE, 0);
> gtk_container_add (GTK_CONTAINER(window), box);
>
> gtk_widget_show_all (window);
>
> gtk_main ();
> return (0);
> }
>
> "freddie" should be snuggled up to the label, but it stubbornly remains
> centered... Is this a bug in Gtk or am I missing something?
>
> Thanks. :)
>
> PS. While I'm here, is it possible to grey out widgets to show they're there
> but inactive, like greyed out menu entries?
>
> --
> spwhite@chariot.net.au
>
> _______________________________________________
> gtk-list mailing list
> gtk-list@gnome.org
> http://mail.gnome.org/mailman/listinfo/gtk-list
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]