Resizing JavaFX WebView - webview

I'm attempting to embed a WebView into a BorderPane as it's middle component. My app starts initially in an unmaximized mode. If I maximize the application, the webview will resize accordingly, but the html & css content will not fill the whole area (it is centered in the WebView). How would I go on fixing this? I've tried to call impl_reapplyCss() and friends, but nothing seems to help.

Related

Adjust WinRT WebView content to control

im trying to fit a Facebook likebox in a webview on a Windows Store APP.
I have done it fine on Android and IOS, just setting the likebox url as html string to the webview.
But in WinRT it shows the box on the upper left corner and A LOT of white space, so the box is really small, i can zoom in to fit it well by hand.
Android and IOS just fit the box in the webview.
Is there any way i can fit it well? also i need to disable user scroll, i only want the user to be able to click the like button.
Thanks in advance.

Missing vertical scrollbar in web browser for vaadin 6.8.12

I have recently built a new Vaadin widgetset for our web application. The new widgetset is based on some new addons but especially on vaadin 6.8.12.
When I deploy the ear file and start the application the right vertical scrollbar that belongs to the web browser (not a java panel or layout) is missing. The scrollbar is actually there but you are forced to drag the browser window far to the right in order to make it visible. Even though it is visible you can not scroll down as much as you need to view the lower content of the page.
This is a problem in Chrome, Firefox and Opera but for some reason Interner explorer seems to handle it just fine.
So what I want is that the browser scrollbar should be visible regardless of the size of the window.
Any ideas?
The height of a layout must be undefined for the vertical scrollbar to show up. If you set it to 100%, any content off the bottom of your browser window / tab will be hidden.
If that's not enough, please add some code to see how you made your main window layout.

WebView and AppBar for Desktop PCs

I'm using a WebView control in my app, and it takes all the screen in both width and height. I use the "WebBrush workaround" to be able to display the AppBar and other controls in front of the WebView when needed.
For the AppBar it's working when using a tablet and swiping from the bottom or the top of the device. But on a desktop when clicking the right button of the mouse, the AppBar are disappearing almost at the same time they are appearing.
Does a trick/workaround exist to be able to support this scenario?
The sample for the WebView contains a scenario with a full screen WebView and the AppBar. The hack is to resize the WebView when the AppBar opens.
http://code.msdn.microsoft.com/windowsapps/XAML-WebView-control-sample-58ad63f7

Make a website automatically load in Landscape view on an iPad

I'm wondering if anyone can help me. I have created a website and I want it to automatically load in landscape view on the iPad. Is this possible and if so can it be done with javascript or css?
You can't change the frame (the Safari window, status bar, URL bar, etc) from inside JavaScript / HTML, but you could wrap your whole site in a div and add the "-webkit-transform: rotate(90deg);" attribute when you detect that it's in portrait orientation.
That will display your site in landscape, but the user will probably then rotate the device itself into landscape which would then rotate your content incorrectly oriented relative to the user. You'd have to detect that using JS and remove the CSS attribute above when you truly are in landscape. If you're using jQuery or something I could imagine it being relatively easy, but the user may still see a bit of flickering as the content bounces around.

Scrolling on iPad for an iframe within GWT window

PLEASE NOTE: This is not a "use two fingers to scroll" problem. Whether it is one finger, or two, or three, or the whole hand, for some reason our iframe does not scroll on an iPad. :)
Here is the scenario:
In our web application, which is built using EXT-GWT, we have a few windows that open as (maximized) pop-ups and present some forms to the users. These forms, which are most of the times external, are rendered in an iFrame and some of the forms have their content collapsed at the initial load - the user can choose to expand any section of the form, fill it in and submit. Now everything works fine except the scrolling in iPad. After the iframe's content is loaded and collapsed (collapsing is done using JS on the client side, basically, the content loads as expanded by default and then is collapsed by JS) iPad just fails to provide scolling to the iframe. Even after the content of the iframe is expanded the iframe does not get any scrolling.
As of now, we have solved this problem by increasing the height (using JavaScript) of the EXT-GWT window to the size of the expanded iframe body content. This makes the whole window scrollable, instead of just the iframe within the window. While it works, the window becomes way to big, so I was wondering if there is any better way for us to provide scrolling to the iframe.
Thanks for the help,
Nitin
For iOS devices you need set overflow: auto; or the scrolling won't work. For my web apps I used fancybox to display iframes modally and once I change the overflow setting in the css file the two finger scroll worked perfectly on the iPad.
After trying (almost) everything, I have come to the conclusion that increasing the GWT window height to the iframe.body.height is the only solution for getting the window/iframe to scroll on iPad. Hopefully, this will help someone in future.
I´m pretty new to GWT, but for me it worked like this:
The parent-div of the iframe has a class in my case, x-component.
I made an entry to my css file like this:
.x-component{-webkit-overflow-scrolling: touch; overflow:auto;}
It works as well if I set these entries not to the class, but to the div-element itself.
Hope that helps

Resources