WebClient.PAGE_OVERFLOW with full screen Shell [message #1773345] |
Tue, 26 September 2017 15:07 ![Go to next message Go to next message](theme/Solstice/images/down.png) |
|
Could someone please clarify how WebClient.PAGE_OVERFLOW is supposed to work in RAP?
Let's say I have a Shell that is full screen, when will the browser decide to enable vertical scrolling? I have WebClient.PAGE_OVERFLOW set to scrollY, which sometimes makes the browser's native vscroll appear, but it doesn't have any effect - I can scroll it up and down, but it doesn't affect my RAP application.
I suspect the problem lies in how I have defined my Shell and its' content, so I'm looking for some guidance on how it is supposed to be used.
My Shell is full screen, and contains various Composites and ScrolledComposites.
Do I effectively just size my controls to drop past the bottom edge of the Shell?
I can see that the RAP Demo uses this feature, and it works how I'd expect, so I know it is me using it wrong!
Any help appreciated!
John
---
Just because you can doesn't mean you should
|
|
|
Re: WebClient.PAGE_OVERFLOW with full screen Shell [message #1773926 is a reply to message #1773345] |
Fri, 06 October 2017 15:37 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) ![Go to next message Go to next message](theme/Solstice/images/down.png) |
|
For anyone interested, I finally figured out what was missing in my code - I needed to set the CSS Style for overflow on the top-level Shell itself, as well as making the Shell fullscreen(true) earlier in the processing. Also added SWT.TITLE|SWT.CLOSE|SWT.RESIZE styles for the Shell, although I'm not sure if these were important - the fact that it is fullscreen seem to ignore the title/close parts anyway, which gives the results I needed.
To set overflow on the shell, I did this in code:
String $el = "$el";
exec( "rap.getObject( '", getId(shell), "' ).", $el, ".css( 'overflow', null );" );
and the exec method, which I think is published elsewhere, like this:
private static void exec( String... strings ) {
StringBuilder builder = new StringBuilder();
for( String str : strings ) {
builder.append( str );
}
JavaScriptExecutor executor = RWT.getClient().getService( JavaScriptExecutor.class );
executor.execute( builder.toString() );
}
---
Just because you can doesn't mean you should
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03744 seconds