A a n g l o Active Member Licensed User Longtime User Mar 23, 2021 #1 hi, i'm loading an htm file into a WebView using : B4X: wv.LoadUrl(xui.FileUri(File.DirApp,"1.htm")) the content is automatically wrapped according to the WebView size. that's great. the problem is that when a vertical scrollbar appears - it covers parts of the last letter in some lines : any way to set a margin ? Thanks,
hi, i'm loading an htm file into a WebView using : B4X: wv.LoadUrl(xui.FileUri(File.DirApp,"1.htm")) the content is automatically wrapped according to the WebView size. that's great. the problem is that when a vertical scrollbar appears - it covers parts of the last letter in some lines : any way to set a margin ? Thanks,
DonManfred Expert Licensed User Longtime User Mar 23, 2021 #2 a n g l o said: any way to set a margin ? Click to expand... i guess you need to do it in the html-file. I usually not use webview in a b4j app. Upvote 0
a n g l o said: any way to set a margin ? Click to expand... i guess you need to do it in the html-file. I usually not use webview in a b4j app.
Eme Fibonacci Well-Known Member Licensed User Longtime User Mar 24, 2021 #3 Please, Can you try this? B4X: Sub wv_PageFinished (Url As String) Dim script As String="document.getElementsByTagName('body')[0].style = 'padding-right: 50px';" Dim jo As JavaObject = wv jo.RunMethodJO("getEngine", Null).RunMethod("executeScript", Array(script)) End Sub Last edited: Mar 24, 2021 Upvote 0
Please, Can you try this? B4X: Sub wv_PageFinished (Url As String) Dim script As String="document.getElementsByTagName('body')[0].style = 'padding-right: 50px';" Dim jo As JavaObject = wv jo.RunMethodJO("getEngine", Null).RunMethod("executeScript", Array(script)) End Sub