gtk question

gtk question

Post by mdew » Sun, 16 Sep 2001 00:37:56



hi, Im a newbie this gtk+ shit :) heres a sample of code...

        ....
        v = gtk_hbox_new (FALSE, 0);
        w = create_color_picker (_("Body Background"), &text_bg_color, &win->text_bg_gcp);
        gtk_box_pack_start (GTK_BOX(v), w, 0, 0, 0);
        w = create_color_picker (_("Body Foreground"), &text_fg_color, &win->text_fg_gcp);
        gtk_box_pack_start (GTK_BOX(v), w, 0, 0, 0);
        w = create_color_picker (_("Quoted Text 1"), &text_quoted_color[0], &win->text_quoted_gcp[0]);
        gtk_box_pack_start (GTK_BOX(v), w, 0, 0, 0);
        w = create_color_picker (_("Quoted Text 2"), &text_quoted_color[1], &win->text_quoted_gcp[1]);
        gtk_box_pack_start (GTK_BOX(v), w, 0, 0, 0);
        w = create_color_picker (_("URLs"), &text_url_color, &win->text_url_gcp);
        gtk_box_pack_start (GTK_BOX(v), w, 0, 0, 0);
        frame = gtk_frame_new (_("Colors"));
        gtk_container_add (GTK_CONTAINER(frame), v);
        gtk_box_pack_start (GTK_BOX(vbox), frame, FALSE, FALSE, GNOME_PAD_SMALL);
        ....

this creates 5 color_picker widgets horizontally.. what I want is a 2x2
+1 table rather..

Im gathering I do this via some sortof table, how would i do this?

--

id: 9DF3262C
key fingerprint: B556 04DA CFD9 78DD 9215  A970 8196 FB6D 9DF3 262C

 
 
 

gtk question

Post by Christopher Fairbair » Fri, 21 Sep 2001 20:25:19



> this creates 5 color_picker widgets horizontally.. what I want is a 2x2
> +1 table rather..

To keep it similiar to the code you provided why don't you simply extend
your code to pack horizontal boxes (gtk_hbox_new.....) inside a gtk_vbox???

Make two horizontal boxes which each contain 2 colour pickers respectivly.

Then insert these into a vertical box, into which you would also insert
your 5th colour picker..............

Hope it helps,
Christopher Fairbairn.

 
 
 

1. gtk question

hi
(another damn newbie...)
I installed Enlightenment and upgraded lots of libraries - but now when
I type control-panel I get an error: libgtk.so.1 doesn't exist.
My version of gtk+ is 1.2.0-1 (I believe it's the latest)
Is there some script I have to modify somewhere?
Thanks for any kind of help...

Gabriel.
(and if this isn't the right ng, where should I post?)

2. How do I route to/from a second ethernet?

3. GTK Question: autoscrolling a clist

4. ATI all in wonder 128

5. GTK Question

6. RFD on splitting comp

7. GTK+ Question

8. termcap/terminfo entry

9. Gtk+ question

10. GTK question

11. Gtk question

12. Gimp/GTK question/complaint

13. Gtk+ questions