Re: [gtk-list] Re: Optimum way to set the width of a clist



Geert Bevin wrote:
> 
> Do a gtk_widget_set_usize() on the window or the clist widget. Strangely
> this only needs to be done once (for example when you show the widget
> the first time).

	When I show the clist, it's empty. The user clicks on a button and the clist is
filled. Then I do column_autosize() of clist. The result is a window of 2037
pixels width. Then I set horizontal scroll policy to AUTOMATIC and set_usize()
(I'm tried this with the toplevel, the scrolled window and the clist) to 1280.
The scrolled window resizes itself to the minimum clist's width. Then I click
(only click) in the resize areas (provided by WM) of the toplevel window and the
scrolled window takes my set_usize() values (or aprox) ...


> 
> >         This works. But then there are another problem. How can I to limit the size of
> > the scrolled window ? If the clist is too big the result window is bigger than
> > screen.
> >
> >         I have tried to catch the configure, size_request/allocate events and, if the
> > width is greater than i.e. 1280, setting a fixed width of 1280 and horizontal
> > scroll policy to AUTOMATIC.
> > The result is ugly, the window resizes itself to the minimum size of clist ...
> >
> >         Thanks,
> >
> >                 - José Miguel



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