Re: treeview/scrolled box resizing



On Sun, 11 Apr 2010 19:28:56 +0100
Chris Vine <chris cvine freeserve co uk> wrote:
> I am not at all clear what you are trying to do, but if it is a way of
> dealing with the issue in your first post, namely "I have a treeview
> associated with a scrollbar in a box, but I no matter what, the
> treeview insists on resizing to 'show' all of it's contents, making
> the scrollbar useless, and possibly extending the window way off the
> bottom of the screen (making the whole thing useless)", then I have
> never had a scrolled window behave other than in the correct way with
> a tree view, namely not to resize in the way you mention but to
> scroll instead.
> 
> Possibly you haven't called Gtk::ScrolledWindow::set_policy().  

Actually I was not even using ScrolledWindow, qv.

http://www.gtkforums.com/viewtopic.php?p=15072#15072

I had a VBox with a treeview, an associated adjustment, and a scrollbar
set to that adjustment.  Someone pointed out this is the wrong way to
go since it does not prevent the expansion of the treeview.  I
suppose that method will only work if you are setting a definite widget
or window size.

Also, I realized that you can use -1 for natural size, so I was wrong
about having to commit to both dimensions.  On strange thing remains:
If I don't set an initial size equal to a few lines (say 75px),  the
treeview in the scrolled window appears with one line visible, but the
scrollbar completely extended, so it appears as if there is only one
line there, as the scrollbar cannot be moved.  You have to use the
little arrows at either end to scroll.  I imagine this is because the
scrollbar cannot be smaller than a single line.

Setting the treeview height to 75 works, and the widget can be manually
expanded if all the pack opts are right, but this seems like a lousy
hack because it depends on the user not using a large font...I could
set it even bigger, but I actually have three treeview in panes and I
wanted to keep the whole footprint minimal.

-- 
MK <halfcountplus intergate com>


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