Home › Forums › General XMetaL Discussion › Read-only PI › Reply To: Read-only PI
Reply to: Read-only PI
October 6, 2015 at 9:46 pmIf you remove rng.SelectElement() I think you will have something closer to what you want. At the moment your code is affecting the PI's container, not the PI itself.
However, you will also need to change rng.ReadOnly to rng.ReadOnlyContainer because ReadOnly is a read-only property and cannot be set.
But perhaps you want to stop people from removing the PIs? In that case you would use rng.NonRemovableContainer instead.