Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » How do you use FormLayout on a Composite with a Vertical Scrollbar?
How do you use FormLayout on a Composite with a Vertical Scrollbar? [message #449208] Wed, 19 January 2005 14:58 Go to next message
Eclipse UserFriend
Originally posted by: betan.us.ibm.com

This is a multipart message in MIME format.
--=_alternative 0052386185256F8E_=
Content-Type: text/plain; charset="US-ASCII"

Is there a way to add items past the initial visible screen using
FormLayout? More specifically, I have a Composite with a verticle scroll
bar which I'm adding controls to using FormData with the "top" attribute
set to a FormAttachment to the previously displayed Control. However, the
scrollbar is only scrolling to the last item that fits on the size of the
screen initially displayed, and no other items seem to be put on the
composite. I tried setting the bounds of the Composite to something
larger than its size, but that still didn't work. Any suggestions?
--=_alternative 0052386185256F8E_=
Content-Type: text/html; charset="US-ASCII"


<br><font size=2 face="sans-serif">Is there a way to add items past the
initial visible screen using FormLayout? &nbsp;More specifically, I have
a Composite with a verticle scroll bar which I'm adding controls to using
FormData with the &quot;top&quot; attribute set to a FormAttachment to
the previously displayed Control. &nbsp;However, &nbsp;the scrollbar is
only scrolling to the last item that fits on the size of the screen initially
displayed, and no other items seem to be put on the composite. &nbsp;I
tried setting the bounds of the Composite to something larger than its
size, but that still didn't work. &nbsp;Any suggestions?</font>
--=_alternative 0052386185256F8E_=--
Re: How do you use FormLayout on a Composite with a Vertical Scrollbar? [message #449217 is a reply to message #449208] Wed, 19 January 2005 16:41 Go to previous 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_00B5_01C4FE1B.C312FC70
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

The scrollbars in a Composite need to be managed by the application. =
FormLayout (or any other SWT layout) does not manage scrollbars. See =
org.eclipse.swt.custom.ScrolledComposite.

See also this SWT snippet:

http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.swt.sni ppets/src/org=
/eclipse/swt/snippets/Snippet5.java?rev=3DHEAD&content-t ype=3Dtext/vnd.vi=
ewcvs-markup
<betan@us.ibm.com> wrote in message =
news:cslsht$lh0$1@www.eclipse.org...

Is there a way to add items past the initial visible screen using =
FormLayout? More specifically, I have a Composite with a verticle =
scroll bar which I'm adding controls to using FormData with the "top" =
attribute set to a FormAttachment to the previously displayed Control. =
However, the scrollbar is only scrolling to the last item that fits on =
the size of the screen initially displayed, and no other items seem to =
be put on the composite. I tried setting the bounds of the Composite to =
something larger than its size, but that still didn't work. Any =
suggestions?
------=_NextPart_000_00B5_01C4FE1B.C312FC70
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.2523" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT size=3D2>The scrollbars in a Composite need to be managed by =
the=20
application.&nbsp; FormLayout (or any other SWT layout) does not manage=20
scrollbars.&nbsp; See =
org.eclipse.swt.custom.ScrolledComposite.</FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>See also this SWT snippet:</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT size=3D2><A=20
href=3D" http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.swt.sni ppets=
/src/org/eclipse/swt/snippets/Snippet5.java?rev=3DHEAD&a mp;content-type=3D=
text/vnd.viewcvs-markup">http://dev.eclipse.org/viewcvs/index.cgi/org.ecl=
ipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet5.java ?rev=3DHEAD&a=
mp;content-type=3Dtext/vnd.viewcvs-markup</A></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:betan@us.ibm.com">betan@us.ibm.com</A>&gt; =
wrote in=20
message <A=20
=
href=3D"news:cslsht$lh0$1@www.eclipse.org">news:cslsht$lh0$1@www.eclipse.=
org</A>...</DIV><BR><FONT=20
face=3Dsans-serif size=3D2>Is there a way to add items past the =
initial visible=20
screen using FormLayout? &nbsp;More specifically, I have a Composite =
with a=20
verticle scroll bar which I'm adding controls to using FormData with =
the "top"=20
attribute set to a FormAttachment to the previously displayed Control. =

&nbsp;However, &nbsp;the scrollbar is only scrolling to the last item =
that=20
fits on the size of the screen initially displayed, and no other items =
seem to=20
be put on the composite. &nbsp;I tried setting the bounds of the =
Composite to=20
something larger than its size, but that still didn't work. &nbsp;Any=20
suggestions?</FONT></BLOCKQUOTE></BODY></HTML>

------=_NextPart_000_00B5_01C4FE1B.C312FC70--
Previous Topic:SWT HTML browser component
Next Topic:How to get a window to front in SWT?
Goto Forum:
  


Current Time: Thu Apr 25 09:03:29 GMT 2024

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

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

Back to the top