User Tools

Site Tools


Sidebar

Privacy Policy

News

Version 2.50 is out since Jan 1st 2022


Frequently Asked Questions


Namespaces

Note for contributors

If you wish to create a new page in the DroidScript wiki, please click on the most appropriate namespace above and follow the notes for contributors there.

Because of spam, it has been necessary to add a CAPTCHA to the registration form and the save option for editing pages. You will not need to prove you are human if you are logged in, so please register.

Please feel free to improve any existing page, as well as adding new pages to increase the sum of public knowledge about DroidScript.

Formatting Syntax

built_in:webview

This is an old revision of the document!


Table of Contents

WebView control

Create

You can create a control to display local or remote web pages in your App using the CreateWebView method of the app object:

web = app.CreateWebView( width, height );

If you are loading remote web pages, then you might want to use the SetOnProgress method to set the name of a callback function that you want called to report the progress of loading the page.

You can use the LoadUrl method to load an internal or external web page or the LoadHtml method to load text directly from within your App.

 web.LoadUrl( url );
 web.LoadHtml( html, baseFolder );

Note: Using a WebView can be a good way of displaying colored and formatted text areas in your App. If you set the BackColor to a transparent color you can show formatted text over a background image.

If you need to, you can use the Execute method to execute JavaScript code within the WebView.

 web.Execute( text );

Methods

Method Description
web.Back
web.Execute
web.Forward
web.GetHeight
web.GetVisibility
web.GetWidth
web.LoadHtml
web.LoadUrl
web.Release
web.SetBackColor
web.SetBackGradient
web.SetBackGradientRadial
web.SetBackground
web.SetMargins
web.SetOnProgress
web.SetPadding
web.SetPosition
web.SetSize
web.SetVisibility
built_in/webview.1410980899.txt.gz · Last modified: 2014/09/18 03:08 (external edit)