I have a browser component with a pdf viewer inside it. By default, both the browser component and pdf viewer come with their vertical scrolls. I want to disable the the scroll bar on the browser component. I have tried setNativeScrollingEnabled(false)
and it was not helpful. @Francesco Galgani suggested to me https://stackoverflow.com/a/18850181/1277576 but then the CN1 CSS file does not recognize the CSS in that link. Any ideas?
Asked
Active
Viewed 103 times
2

Richard Matovu
- 501
- 4
- 15
-
2That CSS should have gone in the webpage that is being loaded in the browser component, not in your CN1 CSS stylesheet. It has nothing to do with CN1 CSS recognizing it. The CSS is handled by the web view - and it will support it. – steve hannah Aug 12 '20 at 12:03
-
I have implemented it in the web view CSS and it removes the browser component scrollbar but then resizes the body of the browser component from covering the whole page to covering 30% of the page. It's like it overrides the CSS where i set height to 100% and changes it to 30%. What could be the issue? – Richard Matovu Aug 12 '20 at 14:47
-
Is the browser component added directly to a form? Is it in the center of a border layout? If not, how did you lay it out? – Shai Almog Aug 14 '20 at 03:44
-
Yes it is directly added to the form using a border layout in center. – Richard Matovu Aug 14 '20 at 07:18
-
If it's in the center of a border layout in the form it will take up the entire form. What makes you say that it doesn't take up 100% ? – Shai Almog Aug 15 '20 at 05:12
1 Answers
1
I have managed to solve the issue by adding this code to my webpage css:
body{
height: 100%;
overflow-y: hidden;
position: fixed;
width: 100%;
padding: 0;
margin: 0;
}

Richard Matovu
- 501
- 4
- 15