Re: GTK_POLICY_?
- From: Owen Taylor <owt1 cornell edu>
- To: Derek Simkowiak <dereks animal blarg net>
- Cc: gtk-list redhat com
- Subject: Re: GTK_POLICY_?
- Date: 07 Apr 1998 11:51:33 -0400
> I'd like to have a text widget that automatically word wraps (and
> hence never needs a horizontal scrollbar) but always has a vertical
> scrollbar, whether it needs it or not.
>
> It looks like I'll need to manually put in the scrollbar, but I
> have the following proposal:
>
> How about the addition of a "GTK_POLICY_NEVER", as the counterpart
> to GTK_POLICY_ALWAYS? If GTK_POLICY_NEVER existed, I could just use a
> gtk_scrolled_window and set the horizontal bar to GTK_POLICY_NEVER, and
> the vertical bar to GTK_POLICY_ALWAYS.
>
> I don't yet understand the internals of GTK+, so I don't know how
> hard this would be to implement. At first glance, it looks like each of
> the widgets would have to be modified to handle the new policy
> individually. It just seems like it would be a useful addition...(?)
GTK_POLICY_NEVER sounds like a good idea. (I'll add it to the TODO
list). But, your desired behavior is actually very easy to obtain -
POLICY_XXX currently only refers to the CList and ScrolledWindow
widgets. The text widget currently does not have the capability to do
automatic scrollbars. So, simply don't create a horizontal scrollbar
for your Text widget.
[ Jay Painter has suggested in the future abstracting scrollbar
capabilities out into a ScrolledWindow class that could hold
not just Viewports, but also other scrollable widgets ]
Regards,
Owen
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]