Thanks for the update.
It now works such that I can put down a Composite and it fills the ScrolledComposite. I can even drag the size of it larger or smaller. I have put controls in it and scrolled successfully. Thank You.
BUT, I can't make it that easy for you!
The project I will be working on, for a compiler front-end, will be dynamically creating controls inside the ScrolledComposite. I intend to use the Scrolled composite as an interface to compiler options, the number of which could change dramatically between compiler versions. That means, I cannot hard-code the size of the child Composite within the ScrolledComposite. So, instead, I will be using the following commands after the controls are placed:
- Code: Select all
composite.setsize(composite.computeSize(SWT.DEFAULT, SWT.DEFAULT);
scrolledComposite.setContent(composite);
I know SWT-Designer will never do what I want since the SWT-Designer cannot follow my own methods to get the dynamically created controls, and then place them in the Preview... but I would suggest you enable support for "computeSize" so the child composite can shrink and grow as new controls are added to it from the Designer. This can be an option in the Designer window (not necessarily a default option).
I dislike hard-coded sizes especially in a platform independant GUI. That is why I like ScrolledComposite so much. I do not have to worry about the target platform's resolution.
Thanks for all the great work!