get_hyperlink();
set_hyperlink(value);
!MISSING Scrap '_RTJavaScript_PROPERTY_SYNTAX'!
Type | Description |
---|---|
string | The hyperlink for this AnnObject. The default value is null. |
The hyperlink of an object can be any string value or null. It is up to the user's application to determine how to use this value.
example: function SiteLibrary_DefaultPage$example() { var inch = 720.0; // Get the container var container = this._automation.get_container(); // Add a red on green rectangle from 1in 1in to 2in 2in var rectObj = new Leadtools.Annotations.Core.AnnRectangleObject(); rectObj.set_rect(Leadtools.LeadRectD.create(1 * inch, 1 * inch, 1 * inch, 1 * inch)); rectObj.set_stroke(Leadtools.Annotations.Core.AnnStroke.create(Leadtools.Annotations.Core.AnnSolidColorBrush.create("red"), Leadtools.LeadLengthD.create(1))); rectObj.set_fill(Leadtools.Annotations.Core.AnnSolidColorBrush.create("green")); // Set its hyperlink rectObj.set_hyperlink("http://www.leadtools.com"); // Add it to the container container.get_children().add(rectObj); // Add a blue on yellow rectangle from 3in 3in to 4in 4in var rectObj = new Leadtools.Annotations.Core.AnnRectangleObject(); rectObj.set_rect(Leadtools.LeadRectD.create(3 * inch, 3 * inch, 1 * inch, 1 * inch)); rectObj.set_stroke(Leadtools.Annotations.Core.AnnStroke.create(Leadtools.Annotations.Core.AnnSolidColorBrush.create("blue"), Leadtools.LeadLengthD.create(1))); rectObj.set_fill(Leadtools.Annotations.Core.AnnSolidColorBrush.create("yellow")); rectObj.set_hyperlink("http://www.leadtools.com/downloads/demos.htm"); // Add it to the container container.get_children().add(rectObj); // Subscribe to the Run event of the automation this._automation.add_run(function(sender, e) { // e is of type AnnRunDesignerEventArgs // Check for status == End if (e.get_operationStatus() == Leadtools.Annotations.Core.AnnDesignerOperationStatus.end) { // Get the annotation object var annObj = e.get_object(); // Get its hyperlink string var hyperlink = annObj.get_hyperlink(); // Browse to it if(hyperlink != "" && hyperlink != null) { alert("Opening\n" + hyperlink); var winObj = window.open(hyperlink); if (winObj == null || typeof winObj == 'undefined') { alert("Your Popup Blocker has blocked saving the annotation file to your disk. Disable the Popup Blocker for this web site and try again."); } } } }); // Switch to run mode this._automation.get_manager().set_userMode(Leadtools.Annotations.Core.AnnUserMode.run); alert("Run mode, click on the rectangles to go to their hyperlinks"); },