File reference

About this task

The definition of XML UI Widgets is based on BTT Element Factory. User can reference the widgets that defined in other definition file leverage on the ability of BTT Element Factory.

To reference a widget that defined in other definition file, two tag should be used:

<import file="the file which the widget is defined in" />
<refTag refId="referenced widget id" />
Note: The referenced widget must be in the top level in its definition.

The following definition file will reference a Label that defined in label.xui.

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<ref.xui>
  <import file="label.xml" />
  <Composite id="reference" background="255,255,255" bounds="10,10,628,383">
   <refTag refId="label01" />
  </Composite>
</ref.xui>

The label.xui file:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<label.xui>
  <Label id="label01" bounds="10,60,600,18" text="status"/>
</label.xui>