I have a vaadin layout that works fine on a larger screen. As soon as the screen size (and the resolution) drop, all the contents get cut off and no scrollbar appears.
I tried using a Panel to remedy the issue, but the panel likewise gets cut off.
Panel panel = new Panel();
panel.setContent(horizontalSplit);
panel.setSizeFull();
panel.getContent().setSizeUndefined();
I also tried using
Responsive.makeResponsive(horizontalSplit)
but it still cuts off
Any suggestions?
If you set
panel.setSizeFull();
and
panel.getContent().setSizeUndefined();
then it is normally to content be cutt of on small screens.
Solution is to setSizeFull() on panel content too.
Add the following style in your styles.scss file
.overflow-auto{
overflow : auto;
}
Then set StyleName to your panel
panel.setStyleName("overflow-auto");
Related
The content on my screen is definitely able to fit into the given screen size, yet the app still shows scrollbars if the screen is shorter than a certain height.
This fiddle shows the issue, if you shrink the result pane to a certain height.
What I've tried:
Adding `overflow-y:hidden' to the body fixes this issue, but I want to be able to scroll in the y-direction if needed, just not when it's not needed.
How can I stop this scrolling when unnecessary?
The reason ended up being because of a rule in the jQueryMobile.css:
.ui-page, bla, bla{
min-height: 420px;
}
changing that to a smaller number that matches what I needed fixed the issue.
I'm building an iOS 5/6 app that has a UIWebView. It loads some HTML that I have embedded in my app.
Now when I rotate my device, the WebView changes its size (as I want it to fill the entire width of the screen).
And then it gets weird: some content gets scaled up and some content doesn't get scaled up. See this image with some example text in it:
As you can see, the header (H6) stays the same, while the paragraph gets scaled up. Does anybody have an idea how to prevent this? I want the html to look the same in landscape as it does in portrait mode.
I've tried setting the viewport scaling to 1: <meta name="viewport" content="initial-scale=1.0,max-scale=1.0">
but that doesn't help. The body's font-size style is set to 14px, but changing that to 14pt or a percentage also made no difference. Setting the width of the body to 100% also didn't help.
Strangely, removing the line break (<br/>) that's in the text fixes it but I need line breaks to be in there so that's no solution.
The only thing that does work is reloading the UIWebView's content after an orientation change, but that doesn't prevent it from looking wrong during rotation, and it resets any scrolling that the user may have done.
Any ideas?
Try this:
body {
-webkit-text-size-adjust: none;
}
I'm not sure, but it might be the scalesPageToFit propertie on your UIWebView.
If you are coding on XCode (I assume that because you are using UIWebView)
Choose the UIWebView on the nib.
Ultilities pane > Size inspector > in the Autosizing box, remove both double-direction arrows.
The UIWebView now has fixed size and won't automatically scale to orientation.
Is this what you want?
Sorry, probably another silly question, but I've got a lot of information to put onto a pane of my RoR application, how do I implement scroll functionality so if the information is more then what should fit within a fixed pane (say 600 px wide by 600 px down), then a scroll option will automatically be available?
Even better if I can monitor the window size, and if there is more text then window then to automatically enable scrolling both vertically...
I suppose what you need is to style your container element. More to do with CSS rather than Rails
.some-container{width:600px;height:600px;overflow:auto;}
hi I am new to blackberry development..
I am trying to add a vertical scroll bar on the screen, but not able to do that. because I do not know the way.
VerticalScrollManger scroll = new VerticalScrollManager(Manager.VERTICAL_SCROLL);
please give me the solution.
thanks
Things that extends net.rim.device.api.ui.Manager (like a VerticalFieldManager) can have style bits set in the constructor that specify which type(s) of scrolling you want and whether or not the scrollbars (arrows) should be displayed. Put your Field into a manager that has scrolling enabled and set the manager for the screen You need to set the manager containing the component/field that is too large for the screen to have scrolling enabled AND scrollbars drawn to see scroll arrows.
The style bits you want to set are: Manager.VERTICAL_SCROLL | Manager.VERTICAL_SCROLLBAR
If your UI is built on top of the blackberry classes MainScreen or FullScreen, you can use the constructor taking an argument of type long to set the style bits: MainScreen(long style) could be called as MainScreen(Manager.VERTICAL_SCROLL | Manager.VERTICAL_SCROLLBAR); to set the style bits for the screen to include scrolling and vertical scroll indicator arrows.
There is an occasional issue that FieldManagers that are fixed size will sometimes not show scroll arrows (but they'll still scroll). See Blackberry VerticalFieldManager with fixed size : Scroll issue if you are concerned about that issue.
If by scrollbars you mean the small blue arrows, then you can get these to display using the method Jessica described above (set style bits VERTICAL_SCROLL and VERTICAL_SCROLLBAR). However, if by scrollbars you are referring to actual bars that indicate the scrolled position (as seen in the Browser app) then you would need to draw these on the manager yourself, as the BlackBerry API doesn't provide you with any way to display them automatically.
To do something like that you'd need to subclass VerticalFieldManager and override the paint method. Use a combination of the screen height (Display.getHeight()), the manager height (getVirtualHeight()) and the scroll position (getVerticalScroll()) to calculate the Y position and height of the bar, and then draw it on the screen using g.drawRect() or something similar.
If you want a fancier-looking scrollbar, take a look at my article in BlackBerry knowledge base:
http://supportforums.blackberry.com/t5/Java-Development/Implementing-a-standard-style-scrollbar-on-a-Blackberry-device/ta-p/504416
In our application we have a text area with row size 20 .
Earlier when we were using the IE6 browser then the text area was displaying properly on screen but after switching over IE7 browser we have seen that after filling up 20 lines a active scroll bar start displaying with text area and only 19 lines are displaying in text area and 1 line is hiding in scroll bar and to check that 1 line we have to use the scroll bar. Please note that our text area's row size is 20 which means it should display 20 lines without active scrollbar which was happening in IE6 browser but not happening in IE7.
We are not sure whether anybody else have faced this kind of problem before.
Guys..as of now we have done some workaround by using bottom-padding to text area.....by doing this all the contents are dislaying properly in text area boxes but still the active scroll bar remains with the text area box.
let us know if you guys having any different solution.
Could you have a CSS rule somewhere setting the physical height of the textarea?
You might try applying the Overflow property to the CSS for the text area. Try overflow:auto; or overflow:hidden;. The last one will eliminate all scroll bars though. You could also try changing the border-width: thin;
I think you are using overflow:scroll, make it as overflow:auto.i checked it,it's working!
In spite of using row="20", try to use a fixed height for the textarea. And don't forget to put line-height. It will definitely solve this problem.