Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[platform-swt-dev] Contents of an Eclipse Property Page Resize to Screen Size



I've been battling a problem for quite some time and have failed to come up
with a reliable solution.

I have created a property page in Eclipse and filled it with numerous
controls:

1)multiple group widgets with controls in the groups
2)a tabfolder with multiple tabs, some of which have child frames in them
3)a few other controls not in groups

The problem is when I open the project properties, and then select my
property page, the entire properties window resizes to the size of the
screen.  I avoided this by placing a "getShell().setSize" command at the
beginning of my "createContents()" method, and then a "composite.pack()"
statement at the end.  But, oddly enough, the size of the window AND
contents is fine the first time I open the properties page, but the second
time I open it (in the Eclipse session), the window is sized correctly but
the contents are sized as if the window was huge again.  If I resize the
window at all (drag the frame), the contents resize down to the size of the
window and it looks good again.

Can placing values in text boxes, values that are longer than the text box,
cause the text box to expand to the screen's limits, in turn causing the
properties window to expand.  Can using "FILL_HORIZONTAL" cause similar
problems?

I feel I am missing some basic discipline in SWT to avoid this
resizing/expanding problem.  Does anyone have any suggestions.  I would be
happy to post some code, but it is a monster createcontents() method.


Thanks,

Chad Barnes
Rockwell Collins Inc.



Back to the top