Setting Preserve Identities to true

The following section describes what happens when you set Preserve Identities to true.

  • You have returned to the Px Editor Workbench Options and set Preserve Identities to true.

  • Follow the first three steps of the “Setting Preserve Identities to false (default)” section as repeated below.



  1. With Preserve Identities set to true, create a new .px file and open it in the Px Editor.
  2. In the Px Properties side bar, create a gx:Brush property named labelBackground and give it a value of lightGreen. For more details, see the How to use Px Properties section.
  3. Add two labels to the Px page's CanvasPane. Give them the text "My Label One" and "My Label Two".


    Notice that in the Widget Tree side bar, the labels now have different names: “Label” and “Label1”. With Preserve Identities set to true, widgets in Px pages have names. “Label” and “Label1” are the auto-generated names given to label slots, which you can edit.
  4. Right-click the label named “Label”.
    Notice that there is now a Rename command.
  5. Select Rename to change its name to “MyLabelOne”.
  6. Right-click the label named “Label1”, select Rename and change its name to “MyLabelTwo”.


    Notice that their new names now appear in the Widget Tree side bar.
  7. Right-click them and select Edit Properties > Link > labelBackground to link their background properties to the labelBackground Px Property, as done before.
    They should both turn light green.
  8. Save the Px page and under the Px Editor menu, select Goto Source XML. Compare the saved XML with the previous example:


    Notice that in source XML, the <Label> tags now have their name attributes set to “MyLabelOne” and “MyLabelTwo”, which you specified by using the Rename command. In addition, those slot names are referenced by the Px Properties defined in the <properties> tag.