Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Problem with RowLayout wrap inside a FormLayout?
Problem with RowLayout wrap inside a FormLayout? [message #451458] Wed, 02 March 2005 16:42 Go to next message
Donna Gresh is currently offline Donna GreshFriend
Messages: 30
Registered: July 2009
Member
This is a multipart message in MIME format.
--=_alternative 005BCAB285256FB8_=
Content-Type: text/plain; charset="US-ASCII"

This seems very similar to an earlier post regarding a problem with
RowLayout wrap inside a GridLayout, but the same solution didn't work for
me because FormData does not have a widthHint.

Briefly, I have a composite which has a FormLayout. I want one component
of it to be a "button holder" composite with a rowLayout (horizontal), and
I want it to take up just enough room to hold its buttons, and that might
be one or two or three rows, depending on the width of the overall
composite. I want the other component of the composite to be the largest
size it can be (it's a drawing), taking up "the rest" of the room.

I attach the "button composite" to the left, top, and right of the
Composite holding it, and I attach the "picture" to the left, right, and
bottom of the Composite holding it, plus I attach its top to the
"buttonComposite". This does just what I want *except* that the "button
Composite" does not wrap; it clips the buttons instead, and remains one
row in height at all times.

As I mentioned, FormData does not have a widthHint, so I experimented with
using "width" instead like so (modifying the workaround given in the
earlier posting): however in this case, while it did wrap, the space it
takes up vertically did not change (that is, the "picture" did not get any
smaller, so it clipped off the buttons)

shell.addListener(SWT.Resize, new Listener() {
public void handleEvent(Event e) {
Rectangle area = shell.getClientArea();
FormData data = (FormData)(rightPanel.getLayoutData());
data.width = area.width;
shell.layout(true);
}
});

Is it possible to do what I want, that is, have the RowLayout "button
Composite" wrap properly?
--=_alternative 005BCAB285256FB8_=
Content-Type: text/html; charset="US-ASCII"


<br><font size=2 face="sans-serif">This seems very similar to an earlier
post regarding a problem with RowLayout wrap inside a GridLayout, but the
same solution didn't work for me because FormData does not have a widthHint.</font>
<br>
<br><font size=2 face="sans-serif">Briefly, I have a composite which has
a FormLayout. I want one component of it to be a &quot;button holder&quot;
composite with a rowLayout (horizontal), and I want it to take up just
enough room to hold its buttons, and that might be one or two or three
rows, depending on the width of the overall composite. I want the other
component of the composite to &nbsp;be the largest size it can be (it's
a drawing), taking up &quot;the rest&quot; of the room.</font>
<br>
<br><font size=2 face="sans-serif">I attach the &quot;button composite&quot;
to the left, top, and right of the Composite holding it, and I attach the
&quot;picture&quot; to the left, right, and bottom of the Composite holding
it, plus I attach its top to the &quot;buttonComposite&quot;. This does
just what I want *except* that the &quot;button Composite&quot; does not
wrap; it clips the buttons instead, and remains one row in height at all
times.</font>
<br>
<br><font size=2 face="sans-serif">As I mentioned, FormData does not have
a widthHint, so I experimented with using &quot;width&quot; instead like
so (modifying the workaround given in the earlier posting): &nbsp;however
in this case, while it did wrap, the space it takes up vertically did not
change (that is, the &quot;picture&quot; did not get any smaller, so it
clipped off the buttons)</font>
<br>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;shell.addListener(SWT.Resize,
new Listener() {</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; public void handleEvent(Event e) {</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp;Rectangle area = shell.getClientArea();</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp;FormData data = (FormData)(rightPanel.getLayoutData());</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp;data.width = area.width;</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp;shell.layout(true);</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; }</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp;});</font>
<br>
<br><font size=2 face="sans-serif">Is it possible to do what I want, that
is, have the RowLayout &quot;button Composite&quot; wrap properly?</font>
--=_alternative 005BCAB285256FB8_=--
Re: Problem with RowLayout wrap inside a FormLayout? [message #451461 is a reply to message #451458] Wed, 02 March 2005 17:08 Go to previous messageGo to next message
Veronika Irvine is currently offline Veronika IrvineFriend
Messages: 1272
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.

------=_NextPart_000_00B8_01C51F20.8302CAE0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

What version of Eclipse/SWT are you running? In Eclipse 3.1 M3 or later =
the wrapping should just work without messing with the width value.

The following works for me in 3.0:

public static void main(String[] args) {
Display display =3D new Display();
final Shell shell =3D new Shell(display);
shell.setLayout(new FormLayout());
final Composite rightPanel =3D new Composite(shell, SWT.BORDER);
rightPanel.setLayout(new RowLayout());
for (int i =3D 0; i < 15; i++) {
Button b =3D new Button(rightPanel, SWT.PUSH);
b.setText("Button "+i);
}
FormData data =3D new FormData();
data.left =3D new FormAttachment(0, 10);
data.top =3D new FormAttachment(0, 10);
rightPanel.setLayoutData(data);
final Composite leftPanel =3D new Composite(shell, SWT.BORDER);
data =3D new FormData();
data.left =3D new FormAttachment(0, 10);
data.right =3D new FormAttachment(100, -10);
data.top =3D new FormAttachment(rightPanel, 10);
data.bottom =3D new FormAttachment(100, -10);
leftPanel.setLayoutData(data);
=20
shell.addListener(SWT.Resize, new Listener() {
public void handleEvent(Event e) {
Rectangle area =3D shell.getClientArea();=20
FormData data =3D (FormData)(rightPanel.getLayoutData());=20
data.width =3D area.width - 20;=20
shell.layout(true);=20
}
});
shell.open();
while (!shell.isDisposed()) {
if (!display.readAndDispatch())
display.sleep();
}
display.dispose();
}

The code above works in 3.1 but it can also be simplified to:

public static void main(String[] args) {
Display display =3D new Display();
final Shell shell =3D new Shell(display);
shell.setLayout(new FormLayout());
final Composite rightPanel =3D new Composite(shell, SWT.BORDER);
rightPanel.setLayout(new RowLayout());
for (int i =3D 0; i < 15; i++) {
Button b =3D new Button(rightPanel, SWT.PUSH);
b.setText("Button "+i);
}
FormData data =3D new FormData();
data.left =3D new FormAttachment(0, 10);
data.top =3D new FormAttachment(0, 10);
data.right =3D new FormAttachment(100, -10);
rightPanel.setLayoutData(data);
final Composite leftPanel =3D new Composite(shell, SWT.BORDER);
data =3D new FormData();
data.left =3D new FormAttachment(0, 10);
data.right =3D new FormAttachment(100, -10);
data.top =3D new FormAttachment(rightPanel, 10);
data.bottom =3D new FormAttachment(100, -10);
leftPanel.setLayoutData(data);
shell.open();
while (!shell.isDisposed()) {
if (!display.readAndDispatch())
display.sleep();
}
display.dispose();
}
<gresh@us.ibm.com> wrote in message =
news:d04qdr$mcn$1@www.eclipse.org...

This seems very similar to an earlier post regarding a problem with =
RowLayout wrap inside a GridLayout, but the same solution didn't work =
for me because FormData does not have a widthHint.=20

Briefly, I have a composite which has a FormLayout. I want one =
component of it to be a "button holder" composite with a rowLayout =
(horizontal), and I want it to take up just enough room to hold its =
buttons, and that might be one or two or three rows, depending on the =
width of the overall composite. I want the other component of the =
composite to be the largest size it can be (it's a drawing), taking up =
"the rest" of the room.=20

I attach the "button composite" to the left, top, and right of the =
Composite holding it, and I attach the "picture" to the left, right, and =
bottom of the Composite holding it, plus I attach its top to the =
"buttonComposite". This does just what I want *except* that the "button =
Composite" does not wrap; it clips the buttons instead, and remains one =
row in height at all times.=20

As I mentioned, FormData does not have a widthHint, so I experimented =
with using "width" instead like so (modifying the workaround given in =
the earlier posting): however in this case, while it did wrap, the =
space it takes up vertically did not change (that is, the "picture" did =
not get any smaller, so it clipped off the buttons)=20

shell.addListener(SWT.Resize, new Listener() {=20
public void handleEvent(Event e) {=20
Rectangle area =3D shell.getClientArea();=20
FormData data =3D (FormData)(rightPanel.getLayoutData()); =

data.width =3D area.width;=20
shell.layout(true);=20
}=20
});=20

Is it possible to do what I want, that is, have the RowLayout "button =
Composite" wrap properly?
------=_NextPart_000_00B8_01C51F20.8302CAE0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2900.2604" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT size=3D2>What version of Eclipse/SWT are you running?&nbsp; =
In Eclipse=20
3.1 M3 or later the wrapping should just work without messing with the =
width=20
value.</FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>The following works for me in 3.0:</FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>public static void main(String[] args)=20
{<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; Display display =3D new=20
Display();<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; final Shell =
shell =3D new=20
Shell(display);<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;=20
shell.setLayout(new =
FormLayout());<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;=20
final Composite rightPanel =3D new Composite(shell,=20
SWT.BORDER);<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;=20
rightPanel.setLayout(new=20
RowLayout());<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; for (int i =
=3D 0; i=20
&lt; 15; i++)=20
{<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;=20
Button b =3D new Button(rightPanel,=20
SWT.PUSH);<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
b.setText("Button "+i);<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;=20
}<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; FormData data =3D new=20
FormData();<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; data.left =3D =
new=20
FormAttachment(0, 10);<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; =
data.top=20
=3D&nbsp; new FormAttachment(0, =
10);<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;=20
rightPanel.setLayoutData(data);<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &n=
bsp;=20
final Composite leftPanel =3D new Composite(shell,=20
SWT.BORDER);<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; data =3D new=20
FormData();<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; data.left =3D =
new=20
FormAttachment(0, 10);<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; =
data.right=20
=3D new FormAttachment(100, =
-10);<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;=20
data.top =3D&nbsp; new FormAttachment(rightPanel,=20
10);<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; data.bottom =3D new=20
FormAttachment(100, -10);<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;=20
leftPanel.setLayoutData(data);<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nb=
sp;=20
<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; =
shell.addListener(SWT.Resize, new=20
Listener()=20
{<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;=20
public void handleEvent(Event e)=20
{<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
Rectangle area =3D shell.getClientArea();=20
<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
FormData=20
data =3D (FormData)(rightPanel.getLayoutData());=20
<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
data.width =3D area.width - 20;=20
<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
shell.layout(true);=20
<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;=20
}<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;=20
});<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;=20
shell.open();<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; while=20
(!shell.isDisposed())=20
{<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;=20
if=20
(!display.readAndDispatch())<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp ;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp ;=
&nbsp;&nbsp;&nbsp;&nbsp;=20
display.sleep();<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;=20
}<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;=20
display.dispose();<BR>}</FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>The code above works in 3.1 but it can also be =
simplified=20
to:</FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>public static void main(String[] args)=20
{<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; Display display =3D new=20
Display();<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; final Shell =
shell =3D new=20
Shell(display);<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;=20
shell.setLayout(new =
FormLayout());<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;=20
final Composite rightPanel =3D new Composite(shell,=20
SWT.BORDER);<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;=20
rightPanel.setLayout(new=20
RowLayout());<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; for (int i =
=3D 0; i=20
&lt; 15; i++)=20
{<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;=20
Button b =3D new Button(rightPanel,=20
SWT.PUSH);<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
b.setText("Button "+i);<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;=20
}<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; FormData data =3D new=20
FormData();<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; data.left =3D =
new=20
FormAttachment(0, 10);<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; =
data.top=20
=3D&nbsp; new FormAttachment(0, =
10);<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;=20
data.right =3D new FormAttachment(100,=20
-10);<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;=20
rightPanel.setLayoutData(data);<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &n=
bsp;=20
final Composite leftPanel =3D new Composite(shell,=20
SWT.BORDER);<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; data =3D new=20
FormData();<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; data.left =3D =
new=20
FormAttachment(0, 10);<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; =
data.right=20
=3D new FormAttachment(100, =
-10);<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;=20
data.top =3D&nbsp; new FormAttachment(rightPanel,=20
10);<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; data.bottom =3D new=20
FormAttachment(100, -10);<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;=20
leftPanel.setLayoutData(data);<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nb=
sp;=20
shell.open();<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; while=20
(!shell.isDisposed())=20
{<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;=20
if=20
(!display.readAndDispatch())<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp ;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp ;=
&nbsp;&nbsp;&nbsp;&nbsp;=20
display.sleep();<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;=20
}<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;=20
display.dispose();<BR>}</FONT></DIV>
<BLOCKQUOTE=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV>&lt;<A href=3D"mailto:gresh@us.ibm.com">gresh@us.ibm.com</A>&gt; =
wrote in=20
message <A=20
=
href=3D"news:d04qdr$mcn$1@www.eclipse.org">news:d04qdr$mcn$1@www.eclipse.=
org</A>...</DIV><BR><FONT=20
face=3Dsans-serif size=3D2>This seems very similar to an earlier post =
regarding a=20
problem with RowLayout wrap inside a GridLayout, but the same solution =
didn't=20
work for me because FormData does not have a widthHint.</FONT> =
<BR><BR><FONT=20
face=3Dsans-serif size=3D2>Briefly, I have a composite which has a =
FormLayout. I=20
want one component of it to be a "button holder" composite with a =
rowLayout=20
(horizontal), and I want it to take up just enough room to hold its =
buttons,=20
and that might be one or two or three rows, depending on the width of =
the=20
overall composite. I want the other component of the composite to =
&nbsp;be the=20
largest size it can be (it's a drawing), taking up "the rest" of the=20
room.</FONT> <BR><BR><FONT face=3Dsans-serif size=3D2>I attach the =
"button=20
composite" to the left, top, and right of the Composite holding it, =
and I=20
attach the "picture" to the left, right, and bottom of the Composite =
holding=20
it, plus I attach its top to the "buttonComposite". This does just =
what I want=20
*except* that the "button Composite" does not wrap; it clips the =
buttons=20
instead, and remains one row in height at all times.</FONT> =
<BR><BR><FONT=20
face=3Dsans-serif size=3D2>As I mentioned, FormData does not have a =
widthHint, so=20
I experimented with using "width" instead like so (modifying the =
workaround=20
given in the earlier posting): &nbsp;however in this case, while it =
did wrap,=20
the space it takes up vertically did not change (that is, the =
"picture" did=20
not get any smaller, so it clipped off the buttons)</FONT> =
<BR><BR><FONT=20
face=3Dsans-serif size=3D2>&nbsp; &nbsp; &nbsp; &nbsp;=20
&nbsp;shell.addListener(SWT.Resize, new Listener() {</FONT> <BR><FONT=20
face=3Dsans-serif size=3D2>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; =
public void=20
handleEvent(Event e) {</FONT> <BR><FONT face=3Dsans-serif =
size=3D2>&nbsp; &nbsp;=20
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Rectangle area =3D=20
shell.getClientArea();</FONT> <BR><FONT face=3Dsans-serif =
size=3D2>&nbsp; &nbsp;=20
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;FormData data =3D=20
(FormData)(rightPanel.getLayoutData());</FONT> <BR><FONT =
face=3Dsans-serif=20
size=3D2>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;data.width =
=3D=20
area.width;</FONT> <BR><FONT face=3Dsans-serif size=3D2>&nbsp; &nbsp; =
&nbsp;=20
&nbsp; &nbsp; &nbsp; &nbsp;shell.layout(true);</FONT> <BR><FONT=20
face=3Dsans-serif size=3D2>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; =
}</FONT>=20
<BR><FONT face=3Dsans-serif size=3D2>&nbsp; &nbsp; &nbsp; &nbsp; =
&nbsp;=20
&nbsp;});</FONT> <BR><BR><FONT face=3Dsans-serif size=3D2>Is it =
possible to do=20
what I want, that is, have the RowLayout "button Composite" wrap=20
properly?</FONT></BLOCKQUOTE></BODY></HTML>

------=_NextPart_000_00B8_01C51F20.8302CAE0--
Re: Problem with RowLayout wrap inside a FormLayout? [message #451465 is a reply to message #451461] Wed, 02 March 2005 17:36 Go to previous messageGo to next message
Donna Gresh is currently offline Donna GreshFriend
Messages: 30
Registered: July 2009
Member
This is a multipart message in MIME format.
--=_alternative 0060BDD985256FB8_=
Content-Type: text/plain; charset="US-ASCII"

Thank you very much for your response. Unfortunately it has led to another
problem for me (hopefully with an easy fix).

I was using version 3.0, so I decided to upgrade to 3.1 to simplify
things. I downloaded the Windows SDK. Now when I start Eclipse (say by
just double-clicking on eclipse.exe in C:\eclipse) I get

JVM Terminated Exit Code=13



--=_alternative 0060BDD985256FB8_=
Content-Type: text/html; charset="US-ASCII"


<br><font size=2 face="sans-serif">Thank you very much for your response.
Unfortunately it has led to another problem for me (hopefully with an easy
fix).</font>
<br>
<br><font size=2 face="sans-serif">I was using version 3.0, so I decided
to upgrade to 3.1 to simplify things. I downloaded the Windows SDK. Now
when I start Eclipse (say by just double-clicking on eclipse.exe in C:\eclipse)
I get</font>
<br>
<br><font size=2 face="sans-serif">JVM Terminated &nbsp; Exit Code=13</font>
<br>
<br>
<br>
--=_alternative 0060BDD985256FB8_=--
Re: Problem with RowLayout wrap inside a FormLayout? [message #451547 is a reply to message #451465] Wed, 02 March 2005 18:14 Go to previous messageGo to next message
Veronika Irvine is currently offline Veronika IrvineFriend
Messages: 1272
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.

------=_NextPart_000_0176_01C51F29.B8A294B0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

That doesn't sound good. Which version of Eclipse did you download? I =
would recommend 3.1 M5a. What VM are you using? It must be version =
1.4.1 or higher. Try downloading Eclipse again. Install in a clean =
place (i.e. not overtop of 3.0).

<gresh@us.ibm.com> wrote in message =
news:d04tj7$mcn$2@www.eclipse.org...

Thank you very much for your response. Unfortunately it has led to =
another problem for me (hopefully with an easy fix).=20

I was using version 3.0, so I decided to upgrade to 3.1 to simplify =
things. I downloaded the Windows SDK. Now when I start Eclipse (say by =
just double-clicking on eclipse.exe in C:\eclipse) I get=20

JVM Terminated Exit Code=3D13=20



------=_NextPart_000_0176_01C51F29.B8A294B0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2900.2604" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT size=3D2>That doesn't sound good.&nbsp; Which version of =
Eclipse did=20
you download?&nbsp; I would recommend 3.1 M5a.&nbsp; What VM are you=20
using?&nbsp; It must be version 1.4.1 or higher.&nbsp; Try downloading =
Eclipse=20
again.&nbsp; Install in a clean place (i.e. not overtop of =
3.0).</FONT></DIV>
<DIV><FONT size=3D2><A=20
href=3D" http://eclipse.org/eclipse/downloads/drops/S-3.1M5a-20050219 1500/=
index.php"></A></FONT>&nbsp;</DIV>
<BLOCKQUOTE=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV>&lt;<A href=3D"mailto:gresh@us.ibm.com">gresh@us.ibm.com</A>&gt; =
wrote in=20
message <A=20
=
href=3D"news:d04tj7$mcn$2@www.eclipse.org">news:d04tj7$mcn$2@www.eclipse.=
org</A>...</DIV><BR><FONT=20
face=3Dsans-serif size=3D2>Thank you very much for your response. =
Unfortunately it=20
has led to another problem for me (hopefully with an easy fix).</FONT> =

<BR><BR><FONT face=3Dsans-serif size=3D2>I was using version 3.0, so I =
decided to=20
upgrade to 3.1 to simplify things. I downloaded the Windows SDK. Now =
when I=20
start Eclipse (say by just double-clicking on eclipse.exe in =
C:\eclipse) I=20
get</FONT> <BR><BR><FONT face=3Dsans-serif size=3D2>JVM Terminated =
&nbsp; Exit=20
Code=3D13</FONT> <BR><BR><BR></BLOCKQUOTE></BODY></HTML>

------=_NextPart_000_0176_01C51F29.B8A294B0--
Re: Problem with RowLayout wrap inside a FormLayout? [message #451549 is a reply to message #451547] Wed, 02 March 2005 19:28 Go to previous message
Donna Gresh is currently offline Donna GreshFriend
Messages: 30
Registered: July 2009
Member
This is a multipart message in MIME format.
--=_alternative 006AEFC285256FB8_=
Content-Type: text/plain; charset="US-ASCII"

Thanks so much--
I had (stupidly) installed 3.1 over 3.0 and that caused all sorts of
problems. I reinstalled in a clean place, got the corresponding version of
GEF, updated my project properties so that the libraries point to the
newer jars for jface etc., updated my path to find the new swt dll and all
works as advertised. I noticed a need to resize my window to see my
widgets, but I recall something from this list about that so I'm not
worried and I'll go look it up and take care of it.

The rowlayout inside the formlayout does just what I expect now.

Thanks for your help; I have noticed that questions are quickly and
helpfully answered on this group list, even silly ones. It is really
appreciated :)
--=_alternative 006AEFC285256FB8_=
Content-Type: text/html; charset="US-ASCII"


<br><font size=2 face="sans-serif">Thanks so much--</font>
<br><font size=2 face="sans-serif">I had (stupidly) installed 3.1 over
3.0 and that caused all sorts of problems. I reinstalled in a clean place,
got the corresponding version of GEF, updated my project properties so
that the libraries point to the newer jars for jface etc., updated my path
to find the new swt dll and all works as advertised. I noticed a need to
resize my window to see my widgets, but I recall something from this list
about that so I'm not worried and I'll go look it up and take care of it.</font>
<br>
<br><font size=2 face="sans-serif">The rowlayout inside the formlayout
does just what I expect now.</font>
<br>
<br><font size=2 face="sans-serif">Thanks for your help; I have noticed
that questions are quickly and helpfully answered on this group list, even
silly ones. &nbsp;It is really appreciated :)</font>
--=_alternative 006AEFC285256FB8_=--
Previous Topic:Basic List Question
Next Topic:Arrow Button Focus
Goto Forum:
  


Current Time: Fri Apr 26 19:11:34 GMT 2024

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

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

Back to the top