Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Widgets overlapping instead of shrinking
Widgets overlapping instead of shrinking [message #442161] |
Sat, 28 August 2004 12:26 |
Todd Chambery Messages: 31 Registered: July 2009 |
Member |
|
|
Hey all,
I'm having a problem with two Composite panels, where the first overlaps
the second instead of shrinking to fit within the larger panel (and to
accommodate the second). A picture being worth a thousand words, I've
posted a screenshot:
http://subfire.org/~chambery/screenshot/Screenshot-SWT.png
I've seen some posts about this in the archive, but moveAbove() doesn't
work. I need the second panel to stay at fixed width on the right side and
the first panel to fill when the container Composite is resized.
Here's the layout code:
leftSidePane.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, true, 2, 2));
GridData gd = new GridData(GridData.END, GridData.FILL, false, true, 1, 2);
gd.widthHint = 262;
analysisSelectionPane1.setLayoutData(gd);
Thanks,
Todd
|
|
|
Re: Widgets overlapping instead of shrinking [message #442230 is a reply to message #442161] |
Mon, 30 August 2004 15:05 |
Veronika Irvine Messages: 1272 Registered: July 2009 |
Senior Member |
|
|
In your picture, it looks like the right hand side is about 262 pixels wide
which is what you specified in your GridData (gd.widthHint = 262).
The left hand side is using whatever space is left which is consistent with
what you have specified.
If you want the right hand side to show all of its content, then you should
remove the widthHint of 262.
"Todd Chambery" <chambery@zclipse.org> wrote in message
news:pan.2004.08.28.12.26.47.794243@zclipse.org...
> Hey all,
>
> I'm having a problem with two Composite panels, where the first overlaps
> the second instead of shrinking to fit within the larger panel (and to
> accommodate the second). A picture being worth a thousand words, I've
> posted a screenshot:
>
> http://subfire.org/~chambery/screenshot/Screenshot-SWT.png
>
> I've seen some posts about this in the archive, but moveAbove() doesn't
> work. I need the second panel to stay at fixed width on the right side and
> the first panel to fill when the container Composite is resized.
>
> Here's the layout code:
>
> leftSidePane.setLayoutData(new GridData(GridData.FILL, GridData.FILL,
true, true, 2, 2));
> GridData gd = new GridData(GridData.END, GridData.FILL, false, true, 1,
2);
> gd.widthHint = 262;
> analysisSelectionPane1.setLayoutData(gd);
>
> Thanks,
>
> Todd
>
|
|
|
Goto Forum:
Current Time: Thu Apr 25 19:56:10 GMT 2024
Powered by FUDForum. Page generated in 0.02622 seconds
|