Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Canvas and FILL_HOrizontal
Canvas and FILL_HOrizontal [message #1707608] Mon, 07 September 2015 22:04 Go to next message
Dmitry Dukhov is currently offline Dmitry DukhovFriend
Messages: 190
Registered: February 2013
Senior Member
Hello
Why is canvas object not filled on 100%?
simple code
Canvas f= new Canvas(Composite parent, int style);
f.setLayoutData(new GridData(GridData.FILL_HORIZONTAL, 25) );
Dmitry
Re: Canvas and FILL_HOrizontal [message #1707637 is a reply to message #1707608] Tue, 08 September 2015 07:07 Go to previous messageGo to next message
Aleksander   is currently offline Aleksander Friend
Messages: 44
Registered: May 2014
Location: France
Member
Hi, the two parameter constructor is for exact width&height in pixels, GridData.FILL_HORIZONTAL has a value of 768, which is a code.
To fill your canvas you can do as follows:
new GridData(GridData.FILL_BOTH);

or
new GridData(SWT.FILL, SWT.FILL, true, true);


see which suites you better.
Re: Canvas and FILL_HOrizontal [message #1708246 is a reply to message #1707637] Mon, 14 September 2015 22:24 Go to previous message
Dmitry Dukhov is currently offline Dmitry DukhovFriend
Messages: 190
Registered: February 2013
Senior Member
this code make what I want
GridData gridData = new GridData();
gridData.horizontalAlignment = GridData.FILL;

mycomposite.setLayoutData(gridData);
Previous Topic:Using RWT jars in a standard servlet for instanting a (non visible) Display
Next Topic:How to close ProgressMonitorDialog when all UI sessions are exited?
Goto Forum:
  


Current Time: Tue Mar 19 04:10:46 GMT 2024

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

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

Back to the top