|Setting dynamic Composite size inside a ScrolledComposite [message #461142]
||Fri, 16 September 2005 23:25
Originally posted by: scott.klein.goldenhourdata.com|
Hi all -
I have a ScrolledComposite which I place a composite with a dynamic set of
controls (these are pairs of Label/Text controls) laid out vertically
using a FormLayout.
My issue is that I must set a fixed size on the control composite when I
am coding, if I set the height too small then the control-pairs go past
this and I cannot scroll to them, however if I set it to some large value
then when there are only two pairs of controls the scrolly will scroll all
the way past these to the "end" of the composite.
Is there a way to determine the "preferred" size of this composite at run
time so that my scrolled composite will only scroll as far as the last
For instance, say I have 10 rows of these control pairs and each row
should be 20 pixles high, then the composite height should be dynamically
set to around 200+/-
This is a simplification of my issue - I am actually trying to get the
composite to resize if the user has a LARGE system font set, and my forms
are much more complex. However, an answer to the question above should
solve my issue.
Powered by FUDForum
. Page generated in 0.02985 seconds