Linking and Using an HTML5 Control

You can install an HTML5 control directly into your visualization element repository.

HTML5 controls can be added to a repository so that it is possible to distribute a project with all of the necessary contents.

[Tip] Tip

HTML5 controls are often delivered as a package. The initial installation is then performed in the Package Manager.

First installation of an HTML5 control

  1. Click Tools → Visualization Element Repository.

    [Tip] Tip

    The command is available only when there are no projects open in .

    The Visual Element Repository dialog opens.

  2. Select the HTML5 Controls option.

    The Installed Elements list provides information about HTML5 controls which are already installed.

  3. Click the Install command.

  4. In the file selection dialog which opens, select the desired description file of the HTML5 control (*.html5control.xml).

    • If the description file is valid, then the element is automatically installed into the repository. In the visualization, the control is listed in Installed Elements. You can use it.

    • If the description file is invalid, then an error is issued. Then you need to contact the author of the element.

Creating an HTML5 control

  1. The _visu_icon_html5controls.png HTML5 Control Editor is located in the installation folder of in the Windows Start Menu.

    Open the editor.

  2. The file selection dialog opens first. Select the desired description file of the HTML5 control there (*.html5control.xml).

    The data of the element is displayed in the _visu_icon_html5controls.png HTML5 Control Editor.

  3. Edit the element so that a valid description file is created:

    1. Configure the General tab:

      1. Company: Test GmbH

      2. Name: FirstControl

      3. Toolbox Category: Special Controls

      4. Optionally, specify an image file.

        [Note] Note

        If an image is not specified, then a default icon is used.

      5. Optionally, specify a wrapper file (CS format). This file wraps the calls from the framework with the calls to the control itself.

        [Note] Note

        You have to provide the wrapper file.

    2. Optionally, on the Control Properties tab, configure the element interface.

    3. Optionally, on the Localization tab, configure the translations for the user interface texts of the control.

  4. Click _visu_icon_save_install.png Save and Install.

    Your settings are applied and their validity checked. Then the description file is saved and the control is installed in the repository.

In the visualization element repository, the control is listed in Installed Elements.

Example 29. Example: HTML5 control: FirstControl

_vis_img_repository_with_installed_element.png

Using a control

  1. Open your project.

  2. Open a visualization object.

    The recently installed control is available in the Visualization Toolbox view in the category which was specified in the description file.

  3. Drag the control to the visualization editor and select it.

    The element interface is available in the Properties view as defined in the _visu_icon_html5controls.png HTML5 Control Editor.

    _vis_img_first_control_properties.png