P Penfound Active Member Licensed User Longtime User Dec 4, 2015 #1 I have a page the queries a db to create an html file that it loaded into a webview. So far it all works well except that the webview will not scroll and, as the html page can be varying lengths, I could do with solving this one. This bit works as a static, fixed size page Code: wxSessionPlan.LoadHtml(ExecuteHtml(Starter.SQL1, Query, Null, 0, True)) and this bit works Code: File.writestring(File.DirRootExternal,"SessionPlan.html",sbHeader.ToString) and, alternatively this bit works Code: ExecuteHtml(Starter.SQL1, Query, Null, 0, True) but this does not work Code: wxSessionPlan.Loadurl("File.DirRootExternal/" & "SessionPlan.html") it can't find the file which is in /storage/emulated/0 and does exist Any help would be much appreciated as always Thanks Penfound
I have a page the queries a db to create an html file that it loaded into a webview. So far it all works well except that the webview will not scroll and, as the html page can be varying lengths, I could do with solving this one. This bit works as a static, fixed size page Code: wxSessionPlan.LoadHtml(ExecuteHtml(Starter.SQL1, Query, Null, 0, True)) and this bit works Code: File.writestring(File.DirRootExternal,"SessionPlan.html",sbHeader.ToString) and, alternatively this bit works Code: ExecuteHtml(Starter.SQL1, Query, Null, 0, True) but this does not work Code: wxSessionPlan.Loadurl("File.DirRootExternal/" & "SessionPlan.html") it can't find the file which is in /storage/emulated/0 and does exist Any help would be much appreciated as always Thanks Penfound
warwound Expert Licensed User Longtime User Dec 4, 2015 #2 Try prepending "file:///" to the absolute file path of the HTML file you want to load: Code: wxSessionPlan.Loadurl("file:///" & File.DirRootExternal & "/" & "SessionPlan.html") If that fails then experiment with "file://" as File.DirRootExternal may return a path that already contains a single "/". Upvote 0
Try prepending "file:///" to the absolute file path of the HTML file you want to load: Code: wxSessionPlan.Loadurl("file:///" & File.DirRootExternal & "/" & "SessionPlan.html") If that fails then experiment with "file://" as File.DirRootExternal may return a path that already contains a single "/".
P Penfound Active Member Licensed User Longtime User Dec 4, 2015 #3 Thanks warwound the first one works so now just have to get the flingScroll working Upvote 0
P Penfound Active Member Licensed User Longtime User Dec 4, 2015 #4 Anyone know what libraries are required to make flingScroll() work, please? Upvote 0
warwound Expert Licensed User Longtime User Dec 4, 2015 #5 Penfound said: Anyone know what libraries are required to make flingScroll() work, please? Click to expand... WebViewExtras2 has a FlingScroll method: http://b4a.martinpearman.co.uk/webviewextras/WebViewExtras2.html The library files can be found here: http://b4a.martinpearman.co.uk/webviewextras/ Upvote 0
Penfound said: Anyone know what libraries are required to make flingScroll() work, please? Click to expand... WebViewExtras2 has a FlingScroll method: http://b4a.martinpearman.co.uk/webviewextras/WebViewExtras2.html The library files can be found here: http://b4a.martinpearman.co.uk/webviewextras/