Naming objects

You can apply names to any object in your Xara document using the "Apply, remove or inspect names of objects" button on the Selector Tool InfoBar. Alternatively right click an object and choose Names from the drop-down list.

Naming is a general mechanism which has a variety of uses, some of which are described below. Most commonly names are used to form loose sets of objects.

Example uses of names

  • Record information about the objects, e.g. what they are used for;
  • Select the objects. This is particularly useful if the objects are widely separated in the drawing or in a complicated drawing. One click and you can select just those objects that share a name;
  • Selectively export parts of the document. This is particularly useful for web pages with complex graphics, which are often split into "slices" (or small parts) on the web page;
  • For linked stretching where one named object can automatically stretch another named object. For example, changing the text on a button can automatically change the width of the button.
  • Animations - names are used in animations to mark objects which are to be tweened by the exporter. See the Animations chapter for full details.

This dialog is modeless, so you can change the selection while the dialog is displayed. It shows the names for the current selection. The text field at the top of the dialog shows you how many objects are currently selected.

Adding names

To add a name to an object, select the object and open the Names dialog using the button on the Selector Tool InfoBar or right click on the object and choose Names...

Type the new name into the Apply name field, or use the drop down list on the same field to select a name which is already used elsewhere in the current document. Click Add. You should see the name appear in the Names applied list.

Names applied

The Names Applied field shows you the names applied to the current selection. If more than one object is selected, a list of names is only shown if all objects in the selection have exactly the same set of names applied. Otherwise "<many>" is displayed, indicating that there are differences in terms of the names applied to different objects in the selection.

To remove a name from the selected object(s), click the name in the Names Applied list to select it and then click the Remove button.

 

Copyright © Xara