To continue with this content, please log in with your Data Access ID or create a new account.
Cancel Data Access ID
You may not be authorized to see this content. Please contact Data Access Europe for more information.
Cancel Data Access Europe
You are not authorized to see this content.
Cancel Data Access Europe
Next lesson:

Using WebView2 in DataFlex

Lesson 1 - Common Properties

In this lesson we’ll be looking at an overview of properties that the WebView2 control is capable of.

As you might know the WebView component in DataFlex was meant to open for example documentation on the web compatible with Internet Explorer or just webpages as promotion or otherwise.

As Microsoft as now deprecated Internet Explorer and moved to the Chromium-based browser called “Edge”, they also created a new WebView2 control. 

With this control we are able to use the latest Web standards which just wasn’t possible until now with the original Internet Explorer-based one.

DataFlex 20.1 and onwards contains a new interface we created for the WebView2 browser component and is there for anyone to use, directly in the framework.

Let’s start off by looking at the available properties; I have separated these into 4 different categories: Page, Behaviour, and Development.


  • First up is the Page category with two properties. This is the psLocationURL that specifies what the current webpage location is in URL format for example
  • These can contain local mappings as well, as we’ll get into in the next two lessons.
  • Secondly, we have the psDocumentTitle which I do not expect you will use much but can be used to retrieve the HTML <title>-node from the loaded website.
  • Then we have the behavioural properties which have already some more advanced features. psUserAgent for example which indicates to the server on the other end what browser you are using. I do not expect you to use this often but, in some cases, it might be required.
  • prZoomFactor indicates the current zoom factor which enables us to zoom in or out, on the page programmatically.
  • In our case like with building control we do not want people zooming in; in that case we can disable user-zooming by setting pbIsZoomControlEnabled.
  • pbAreBrowserAcceleratorKeysEnabled allows the end user to use for example cntrl+F to search for words on a page or other special key strokes.
  • With pbAreDefaultContextMenusEnabled we will also be able to disable unexpected functionality provided by the browser. Since it will disable any right-click functionality provided by the browser itself.
  • Lastly one Development-oriented property that might help you during your development process.
  • pbAreDevToolsEnabled, allows you to use the JavaScript console and other tooling within your half windows/web application. Which helps you in turn catch JavaScript errors and such. Don’t forget to disable it after this lesson is completed for production purposes.
  • There are some more properties, but those you normally will never have to touch.
  • Off course we also have our Methods and Events, but those we’ll get into as we start to working with the WebView2BrowserControl itself.
  • The next topic is preparing our environment.