[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[news.eclipse.platform.swt] Re: problems with my composite

...and I just remembered, after disposing-then-recreating the composite's
children, be sure to invoke layout() on the composite so that it will
calculate the appropriate sizes for all of the new children.

Grant

"Grant Gayed" <grant_gayed@xxxxxxxxxx> wrote in message
news:ek71dq$92r$1@xxxxxxxxxxxxxxxxxxxx
> Actually SashForm isn't new to 3.2, it goes pretty far back in the eclipse
> timeline.  For an example of using SashForm see
>
http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet109.java .
>
> In general (whether you're using Sash or SashForm) your best bet for
making
> the Composite's contents fill the full available space is to set a layout
on
> your Composite.  For an example of this in the context of a Sash see
>
http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet107.java .
>
> Grant
>
>
> "David Chan" <lifesting@xxxxxxx> wrote in message
> news:a45eb75d13dbdab361cfcad2240daf08$1@xxxxxxxxxxxxxxxxxx
> > Torsten 'Ilja' Rathgen wrote:
> >
> > > hello again,
> > > if I'm writing too confusingly please say it to me, english is not my
> > > mother tongue.
> >
> > > here is my problem:
> > > i have a composite in the right top corner of my shell, on the left
and
> > > on bottom is a sash each so the size is readjustable.
> > > inside this composite i have labels, images and stuff, which changes
> > > often (each time it changes i dispose all children of composite and
add
> > > them again).
> > > my problem is that i want to use the maximum size that is given by the
> > > two sashes and the corner of my shell. how do i calculate the current
> > > size of this available space? because i think i have to set the size
of
> > > the composite first, so i can use pack() afterwards to show it
properly.
> >
> > > what is confusing me is that when i resize one of the sashs the
> > > composite gets drawn perfectly using the maximum space, but not when i

> > > rebuild the stuff inside my composite.
> >
> > > thanks in advance
> >
> > > regards Ilja
> >
> > You can use the new composite *SashForm*, but the SWT 3.2 is needed.
> >
>
>