[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Newsgroup Home]
|
[news.eclipse.platform.swt] Re: Resize Tree on Expand
|
Actually the Tree only began answering a preferred size based on its item's
expanded states in the 3.4 stream, see
https://bugs.eclipse.org/bugs/show_bug.cgi?id=49724 . Prior to this it was
inconsistent (the behaviour that you want existed on linux-gtk only). The
only way I can think of for doing this prior to 3.4 is to manually determine
how many available items there are in the Tree and multiply it by
Tree.getItemHeight().
Grant
"Tito" <outrascenas+eclipse@xxxxxxxxx> wrote in message
news:e99c023199260685052fea349f363598$1@xxxxxxxxxxxxxxxxxx
> But I'm using 3.3 and Tree always return the necessary size to display the
> tree when collapsed. I'm I doing something wrong?
>
> Tom Schindl wrote:
>
> > Eric is right but one warning on win32 this will only work since 3.3 in
> > 3.2 the Tree always returned the size it needs display the top-level
items.
>
> > Tom
>
> > Eric Rizzo schrieb:
> >> Tito wrote:
> >>> Hello, this is my first post here.
> >>>
> >>> I've a Tree with a TreeViewer. I don't want to set a fixed size, but i
> >>> need to view all lines on the tree. When the tree is collapsed its all
> >>> OK, but when i expand one node the vertical scroll bar appears.
> >>>
> >>> Is there a way to resize this tree when one node is expanded?
> >>
> >> This likely depends on what kind of layout you have the Tree contained
> >> in. One thing you can try is to call layout() on the parent Composite
> >> after the tree is expanded.
> >>
> >> Hope this helps,
> >> Eric
>
>
>
>