PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN
New WINDEV and WINDEV Mobile 26 feature!
  • Overview of the HTML Display control
  • Creating an HTML Display control
  • Characteristics of the HTML Display control
  • Options of the "General" tab
  • Options of the "Details" tab
  • Conditions for using the ActiveX mode
  • "Enable zoom" ("UI" tab in the control description window)
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Overview of the HTML Display control
The HTML Display control is used to display a webpage in an application. Thus, in 1 line of code, without using an external browser, your WINDEV applications can display a page of a website.
Creating an HTML Display control
To create an HTML Display control:
  1. On the "Creation" pane, in the "Other controls" group, expand "HTML" and select "HTML Display".
  2. Click at the desired location to create the control. The control appears in the editor.
To view the characteristics of the control, select "Description" in the context menu.
Characteristics of the HTML Display control

Options of the "General" tab

The "General" tab of the control description window allows you to directly enter HTML code or the address of the HTML page to be displayed.
Remark: Any HTML code entered must be between the <HTML> and </HTML> tags.

Options of the "Details" tab

The "Details" tab of the control description window includes the following options:
  • Forbid the execution of JavaScript scripts:
    This option is used to allow (or prevent) the execution of scripts called from the HTML code of control.
    iPhone/iPad This option is ignored: the execution of scripts is always allowed.
    If this option is unchecked, you can:
    • execute JavaScript code in the context of the Web page displayed by the HTML Display control. To do so, use ExecuteJS.
    • allow the execution of WLanguage procedures from the JavaScript code via the option "Allow the WLanguage call from the HTML code (JavaScript WL.Execute function)".
      If this option is selected, in the HTML code of control, all you have to do is use WL.Execute to run a WLanguage procedure. The following syntax must be used:
      WL.Execute(<Name of WLanguage Procedure>, <Parameter>)
      where:
      • <Name of WLanguage procedure> corresponds to the name of procedure to run.
        CAUTION: The WLanguage procedure must necessarily expect a single parameter.
      • <Parameter> corresponds to a character string that will be passed to the procedure. This parameter is mandatory.
      Example:
      • WLanguage procedure
        PROCEDURE ProcFromJS(t)
        ToastDisplay("Called from JS: " + t)
      • Code of HTML control:
        s is string = [
        <html>
        <head>
        <title> A simple example
        </title>
        <script>
        function myFunction()
        {
        WL.Execute("ProcFromJS","titaa");
        }
        </script>
        </head>
        <body>
        <h1> This is an HTML page </h1>
        <p id="demo">A paragraph</p>
        <button type="button" onclick="myFunction()">Try</button>
        </body>
        </html>
        ]
        HTM_NoName1 = s
  • Use IE/Edge ActiveX to display content (compatibility): This option allows you to use the HTML Display control via the Internet Explorer ActiveX plug-in. You can then select the desired rendering engine.

Conditions for using the ActiveX mode

Caution: To use an HTML Display control:
  • WINDEV in a WINDEV application, Internet Explorer version 4 or later (version 11 recommended) must be installed on the development computer and on the deployment computer. WINDEV's HTML Display control is in Internet Explorer 7 mode.
    To display WEBDEV pages in this control, those pages pages must be generated in HTML + Edge mode.
  • AndroidiPhone/iPad in an application in simulator mode, Internet Explorer 4 or later (version 11 recommended) must be installed on the development computer.
  • Versions 21 and later
    iPhone/iPad in an iOS 9.0 application (and later), you must respect the security options. By default, the HTML Display control can only access sites that use an HTTPS connection in compliance with Apple's guidelines. To access other sites (HTTP for example), you must either provide the list of corresponding domains, or disable the security for all the domains. These operations are performed in the iOS application creation wizard. See Generating an iOS application for more details.
    New in version 21
    iPhone/iPad in an iOS 9.0 application (and later), you must respect the security options. By default, the HTML Display control can only access sites that use an HTTPS connection in compliance with Apple's guidelines. To access other sites (HTTP for example), you must either provide the list of corresponding domains, or disable the security for all the domains. These operations are performed in the iOS application creation wizard. See Generating an iOS application for more details.
    iPhone/iPad in an iOS 9.0 application (and later), you must respect the security options. By default, the HTML Display control can only access sites that use an HTTPS connection in compliance with Apple's guidelines. To access other sites (HTTP for example), you must either provide the list of corresponding domains, or disable the security for all the domains. These operations are performed in the iOS application creation wizard. See Generating an iOS application for more details.
AndroidiPhone/iPad

"Enable zoom" ("UI" tab in the control description window)

The "Enable zoom" option:
  • allows the user to pinch zoom.
  • Android displays the zoom buttons.
Android To play HTML 5 videos in an HTML Display control:
  1. Check "Allow execution of scripts" ("General" tab in the control description window).
  2. Enable the device acceleration on the window. To do so, you must edit the manifest of the application.
    • In the generation wizard, go to the "Configuration" step.
    • Click "Advanced configuration".
    • Click "Edit the manifest".
    • Expand the "application" node.
    • Select the "activity" node corresponding to the window containing the HTML control.
    • Add an attribute to this node while specifying "android:hardwareAccelerated" as name and "true" as value.
    • Validate the modifications
    • Finish the wizard.
Minimum version required
  • Version 26
This page is also available for…
Comments
Click [Add] to post a comment