Adding a Custom UI Palette to Your Web Application Library

Add custom UI elements you created with the Placeholder HTML Container to a palette in your web application library.

Before you create a palette for your custom UI elements, complete the following tasks:
  • Enable the preview feature—Navigate to File » Preferences » Preview Features and in the Web Module section, select Enable Placeholder HTML Containers in WebVI library palettes to enable this feature. Refer to Preview Features to learn more about LabVIEW NXG preview features.
  • Create UI elements—Use the Placeholder HTML Container and Obtain JavaScript Reference node to create custom UI elements for your web application.
Use a control definition file to make the custom UI elements you create available in the palette when someone installs your web application add-on.
  1. Create or open a library in your web application project.
    Tip Make sure this library has an extension of .gcomp and has a Web Server target.
  2. Create a control definition file and add it to the library.
  3. Add your Placeholder HTML Container to the control definition file and configure how you want it to appear when placed on the front panel.
    Note If you use the Image URL option, you cannot use an image file in the library at deployment. You must use an image URL from the public internet or a self-contained data URL. If you try to reference an image file in the library component, it may not resolve in the correct location once deployed.
  4. In the library with the control definition file selected, click Create palette file from the configuration pane.
  5. Select G HTML panel palette for the palette type.
  6. (Optional) Use the configuration pane to configure your palette.