Eric Clayberg wrote:Without a real example, I have a hard time envisioning why you would want the inner composite to be the same size as its scrolled parent and still want to see scrollbars. If the two are the same size, there is nothing to scroll.
It is hard without looking at it. This is the issue, in images:
I have a view with a couple of SWT components (buttons, etc., as part of a composite). I want the composite to have a minimum size. Without the flags I mentioned above, the scrollbars display properly if the scrolled composite gets smaller than the actual composite size. As in:
However, when the main window (or view) is big enough, I want the child composite to fill the scrolled composite. As in:
Do you see my problem? The composite has a size set; however, I want the composite to be flushed with the scrolled composite's border.
Now, if I set the expand flags to true, and I make the window smaller than the actual size of the composite, the scrollbars never display--and I was expecting them to show up. As in:
However, when expanded, the child composite is flushed with the scrolled composite. As in:
What I have right now kind of works (I only set to expand horizontally), but I have the same problem with the vertical spacing. As in:
Again, I can live with what I have. But I think I'm misunderstanding how the ScrolledComposite works, as I don't think I'm the only one with this requirement: "flush a composite to the edge of the scrolled composite, and still respect the minimum size of the child composite so that scrollbars display if they are in fact needed."
Thanks for any possible solution, Eric. And in the future I will use the Eclipse SWT forums for this type of question.