isLocked Method |
Gets a value indicating whether the object represented by this PdfObject instance is a locked (pre-existing) form field or a locked (pre-existing) annotation.
function isLocked();
None
Type: Boolean
Returns true if this object is locked; otherwise false.This method should be used to test if an unknown object is a pre-existing form field (and hence can not have some properties changed).
//declare event handler function (which accepts an object of type ObjectSelectedEventArgs as an argument) function objectSelectedHandler(evt) { //if this is not locked if( !evt.obj.isLocked() ) { //move object to top fo page evt.obj.setProperties({"top" : 0}); } } //get API class var myApi = new PdfWebControlApi("PdfWebControl1"); // where "PdfWebControl1" is the ID (ClientID) assigned to the PdfWebControl instance //attach event handler to objectSelected event myApi.addEventListener("objectSelected", objectAddedHandler);