Re: suggestions on creating "blurb" boxes
- From: Owen Taylor <owt1 cornell edu>
- To: dhall virage org
- Cc: gtk-list redhat com
- Subject: Re: suggestions on creating "blurb" boxes
- Date: 11 Mar 1998 15:27:41 -0500
From the category of very late responses ... [ I was checking through
old messages ]
dhall@virage.org writes:
> I'm still tinkering with GTK, and I have a few questions on the GtkText
> type.
>
> I've been using gtk_text_new to create a text box to contain a small blurb,
> such as found in most 'about' box.
>
> Here's my questions...
>
> 1. The text box seems to be of set size. If I usize the window to a
> smaller v-length, the "close" button will be clipped out. Can I
> decrease the size of the text box?
I suspect the problem is that the text box is in a table without
the GTK_SHRINK properties. Take a look at the current testgtk.c
to see how to use GTK_SHRINK. (This doesn't seem to be the case,
in your example code, but perhaps you were trying something different)
Text widgets certainly do shrink properly as of 0.99.5
> 2. Do I have to use the GtkAdjustment values in gtk_text_new to affect
> this? If so, how do I use them?
They won't affect that. They would be used if you wanted to scroll
the text widget yourself.
> 3. Are text boxes always "recessed", do I have to use a label in order to
> create a "flat" surface appearance for a text blurb?
They are always recessed. They are meant for displaying large amounts
of text, and possibly editing it. If you just want to display a
small amount of non-scrolling text, a label is a better choice.
> 4. gtk_widget_realize, uhm, I use it, I saw it textgtk.c, but I not 100%
> sure what it does.
The text widget needs to be realized (that means that the X window is
created) before text is inserted. (So it can know the right default
colors for the new text - this probably could/should be fixed).
To do this, you first must add the text widget into the widget
heirarchy, and then call gtk_widget_realize().
Regards,
Owen
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]