[10237] in The GTK GIMP ToolKit mailing list archive
[gtk-list] Re: help with tables
daemon@ATHENA.MIT.EDU (Lee)
Wed Nov 18 06:08:23 1998
Date: Wed, 18 Nov 1998 11:07:38 +0000
From: Lee <drazka@geocities.com>
To: gtk-list@redhat.com
Resent-From: gtk-list@redhat.com
Reply-To: gtk-list@redhat.com
Aaron Walker wrote:
>
> I am trying to create my own text editor (just to help me learn more
> about GTK+)
> and am having trouble setting up tables to get the text widget and
> scroll bar to align
> properly. I have looked at the GTK tutorial in the GtkText widget
> section, where the
> example uses tables. I tried doing exactly what the example did, but
> I could not duplicate it.
I never saw that example. If I was you, I'd ditch tables for something
as simple as a text box & vscrollbar.
Just use a hbox, like so:
editorbox = gtk_hbox_new (FALSE, 1);
gtk_box_pack_start (GTK_BOX (editorbox), your_text_widget_here, TRUE,
TRUE, 1);
gtk_box_pack_start (GTK_BOX (editorbox), your_vscrollbar_here, FALSE,
FALSE, 1);
gtk_widget_show (text_widget);
gtk_widget_show (vscrollbar);
gtk_widget_show (editorbox);
AFAIR, that should pack your scrollbar and text area into a box, and
they should expand correctly when resized.
> Here is a screenshot of what it looks like:
>
> [Image]
.. snip.. just as a rule of thumb, it's better to post a URL to a
screenshot, rather than posting it to the list.
Hth!
--
Lee.
--
To unsubscribe: mail -s unsubscribe gtk-list-request@redhat.com < /dev/null