[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: How do I resize a CList inside a VBox, inside a Notebook inside...
- From: Havoc Pennington <rhpennin midway uchicago edu>
- To: gtk-app-devel-list redhat com
- Subject: Re: How do I resize a CList inside a VBox, inside a Notebook inside...
- Date: Mon, 23 Nov 1998 12:28:58 -0600 (CST)
On Mon, 23 Nov 1998, Josh M. Osborne wrote:
> (I'm using Gtk-- 0.9.11 with gtk+ 1.0.5, and am willing to make
> calls directly to gtk+ if need be)
>
The Gtk 1.1 series has a much nicer way to do all this, by the way - and
it's going stable in a month or two. So you may want to be thinking about
that.
> I have a CList with contents that change over time. I want to
> keep each col. wide enough to display the widest item inside it.
>
> I'm calling set_column_width() to set the new widths, and set_usize()
> to change the width of the CList as a whole (do I need to do that?).
>
> The individual columns take on the proper width, but I get a vertical
> scrollbar rather then a wider window.
>
You mean a horizontal scrollbar?
The problem is that GtkWindow does not expand to give children as much
space as they want, although most of the containers do. You can see why -
users would probably get kind of irritated if windows changed all around
by themselves. What if the user has a 640x480 display, and the window kept
growing too big?
However, if you know for sure your window won't get too big, you can just
expand it with gtk_widget_set_usize(). However, I would avoid growing it
beyond 600x400 or so. And in general, scrollbars are probably better since
self-resizing windows are freaky from a UI standpoint.
It's useful to know (if you don't) that you can pass -1 for either usize
arg to leave it unchanged, since it sounds like only the horizontal
matters to you.
Havoc
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]