Referencing the widgets in other files

In the XUI file, you can take the widget in other XUI files as references and put the widget on the current design panel. Perform the following steps to get the overall understanding of this function:

  1. Create a new XUI file and configure the import file properties as shown in the following figure.
    Screen capture shows the XUI file
  2. Click the add button to select an existing XUI file as the widget library, and the relative path to the current file will be displayed in the Files section.
  3. On the palette, click Reference, and drag the widget to the design panel. The Reference Models dialog listing the referenced widgets in the importing file is displayed as shown in the following figure.
    The figure displays the reference models dialog
  4. Select the widget model and drag it to the target Composite. The widget model is referenced in the current file. In the following figure, the table widget is referenced.
    Screen capture shows a table widget is referenced
Attention:
  • The widget that is defined in the importing files should have the widget ID, and the ID should be unique.
  • The widget model that can be referenced by the current file should not under any parent widget. For example, there are five widgets defined in the following XUI file. Composite (id="hhh"), Table (id="tb1"), Text (id="txt1"), and Button (id="btn1") can be referenced. But the Button which is defined within the Composite can not be referenced.
    Screen capture is the sample code of an XUI file