Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Setting dynamic Composite size inside a ScrolledComposite
Setting dynamic Composite size inside a ScrolledComposite [message #461142] Fri, 16 September 2005 23:25
Eclipse UserFriend
Originally posted by:

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.

Previous Topic:Tree lines
Next Topic:scaling PNG loses transperacy
Goto Forum:

Current Time: Thu Feb 20 19:19:45 GMT 2020

Powered by FUDForum. Page generated in 0.02985 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top