Relative width of elements / page [message #1467915] |
Mon, 10 November 2014 12:12 |
Sebastian Geedot Messages: 7 Registered: October 2014 |
Junior Member |
|
|
My aim is the implementation of a kind of fileviewer and I am trying to get as much width on den screen as available.
But with Gridlayout the screen size seems to be fixed.
Experimenting with FormLayout by now..
The examples, like org.eclipse.rap.examples(.pages) seem to have a fixed size, too.
Does anyone know a possibility to spread a textarea over the whole width of den Browser window like width="100%" in html?
In html it is basically easy to achieve this, but using RAP I can't see this :-/
Thanks in advance
Geedot
[Updated on: Mon, 10 November 2014 13:16] Report message to a moderator
|
|
|
Re: Relative width of elements / page [message #1468068 is a reply to message #1467915] |
Mon, 10 November 2014 14:50 |
Aleksander Messages: 44 Registered: May 2014 Location: France |
Member |
|
|
You can use a FillLayout, or you can use GridLayout with a GridData on the browser like this: "new GridData(SWT.FILL, SWT.FILL, true, true);"
The browser will take all the available space in the parent.
Then in the browser you setText() like this :
<textarea style="width:100%;">
Your text.
</textarea>
If you want to use the whole screen you can simply open a Dialog and override this:
@Override
protected Point getInitialSize() {
return new Point(PlatformUI.getWorkbench().getDisplay().getClientArea().width , PlatformUI.getWorkbench().getDisplay().getClientArea().height);
}
@Override
protected Point getInitialLocation(Point initialSize) {
return new Point(0, 0);
}
Sorry if I misunderstood your problem.
[Updated on: Mon, 10 November 2014 14:52] Report message to a moderator
|
|
|
|
Powered by
FUDForum. Page generated in 0.04320 seconds