Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Adding a scroll to the Composite widget
Adding a scroll to the Composite widget [message #465451] Wed, 14 December 2005 04:18 Go to next message
Joseph Rignanese is currently offline Joseph RignaneseFriend
Messages: 16
Registered: July 2009
Junior Member
Hi guys,
I'm looking to add a scroll to a Composite widget similar to the
ScrolledComposite, but I want to use a GridLayout for laying out controls
within the composite.

I'm just wondering if this has already been done. Also. Where would you guys
recommend I start? The way I see it the best way would be to extend the
ScrolledCompositeLayout such that it applys a grid layout.. Or my other
option is to extend the Composite and include what's needed to control the
scroll bars..

Can anyone think of a better way of going about this?

Thanks in advance,
Joe
Re: Adding a scroll to the Composite widget [message #465452 is a reply to message #465451] Wed, 14 December 2005 04:25 Go to previous messageGo to next message
Joseph Rignanese is currently offline Joseph RignaneseFriend
Messages: 16
Registered: July 2009
Junior Member
Thinking about it a little more.. Will this work:

1) create a ScrolledComposite with both scrollbars

2) create a Composite with the GridLayout using the ScrolledComposite as
it's parent

3) add my controls to the Composite.

I can't really think of a reason that it shouldn't.. but I'm pretty new to
SWT and would appreciate any suggestions,

Thanks in advance,
Joe
Re: Adding a scroll to the Composite widget [message #465456 is a reply to message #465452] Wed, 14 December 2005 08:23 Go to previous message
Eclipse UserFriend
Originally posted by: friederich.kupzog.de

Hi, this is ablsolutely right, but you are missing a few things.
Have a look into the Java doc for ScrolledComposite. You will see that
you have to call scrolledComposite.setContent() (I think) and
gridLayoutComposite.setSize() (I am sure).

Hope that helped,
Friederich


Joseph Rignanese wrote:
> Thinking about it a little more.. Will this work:
>
> 1) create a ScrolledComposite with both scrollbars
>
> 2) create a Composite with the GridLayout using the ScrolledComposite as
> it's parent
>
> 3) add my controls to the Composite.
>
> I can't really think of a reason that it shouldn't.. but I'm pretty new to
> SWT and would appreciate any suggestions,
>
> Thanks in advance,
> Joe
>
>


--
Friederich Kupzog
Elektronik & Software
Neusser Str. 5-7
50670 Köln
Tel +49 241 9979356
Fax +49 221 726670
www.kupzog.de/fkmk
Previous Topic:Using ScrolledComposite on the J9 JVM
Next Topic:How to define each column's width in a GridLayout?
Goto Forum:
  


Current Time: Mon Dec 16 02:06:46 GMT 2019

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

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

Back to the top