cancel Property |
Gets or sets a value indicating whether the event should be canceled.
this.cancel;
Type: Boolean
true if the event should be canceled; otherwise, false.To cancel RAD PDF's default behavior, this property should be set to true in an event handler.
//declare event handler function (which accepts an object of type ObjectClickEventArgs as an argument) function objectClickHandler(evt) { //make the new object unmovable evt.obj.setProperties( {"movable" : false} ); //if this is a text object if(evt.obj.getType() == evt.obj.ObjectType.TextShape) { //cancel the default click action evt.cancel = true; } } //get API class var myApi = new PdfWebControlApi("PdfWebControl1"); // where "PdfWebControl1" is the ID (ClientID) assigned to the PdfWebControl instance //attach event handler to objectClick event myApi.addEventListener("objectClick", objectClickHandler);