Hi, I am having some problems with a swt layout and was hoping someone can give me a hint.
I have a FormPage with some sections. The FormPage body has a GridLayout with 1 column. One of the sections uses GridData.FILL_BOTH. The others only fill horizontal.
The section's client has a FillLayout and a FigureCanvas is drawn inside.
When I open the FormPage every thing is fine. The section is as big as it should be and the canvas fills the section. I can add figures to the canvas and the canvas gets scrollbars when there are too many figures inside.
However, when I open the formpage when there already are many figures inside the canvas then the whole section gets bigger and the scrollbars are attached to the formpage.
I guess this happens because the canvas calculates its size using the preffered size of the figures and the hints. As long as the hints are bigger on startup, everything is fine.
All I want is that the canvas always has the same size, as the sections or as the the sections above.
I have attached two images. I hope they show the issue.
The FigureCanvas is scrollable. When more figures are added to the canvas so the initial size is to small, the scrollbars become visible and only the canvas is scrollable. So when the section already has scrollbars and then figures are added to the canvas, there are two scrollbars. One for the canvas and one for the section...