RE: Change viewport size requisition?



Hi Owen!

On Sat, Nov 28, 1998 at 06:56:45PM -0500, Owen Taylor wrote:

> I'm about to commit the patch gtk-rao-981125, which
> adds the long-requested feature of GTK_POLICY_NEVER
> to the scrolled window. But I notice that it really
> isn't as useful as it should be because of an
> odditity in the way the Viewport widget works.
[...]
> I don't see any other way to enable users to get
> the IMO, very useful above "snapping" behavior
> without gross hacks.

The problem is the same for every "scrollable" widget
which can be added to a scrolled_window. E.g. CList only
returns the border size too, as long as CLists
scroll_adjustments are != NULL. If you call
gtk_clist_set_hadjustment(clist, NULL) clist will
answer size requests with its exact width.
I like that behavior, because it works without
scrolled_windows and its policies. If you don't want
to scroll a CList in one direction, don't add an adjustment.
So a GTK_POLICY_NEVER would be very straight forward :
gtk_widget_scroll_adjustments (widget, NULL, NULL);

bye,
  Lars



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]