Gets or sets a string which represents the hyperlink for this AnnObject.
Object.defineProperty(AnnObject.prototype, 'hyperlink',get: function(),set: function(value))
hyperlink: 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.
This example will create two annotation objects with hyperlinks and add them to a container, switches to run mode and run the hyperlink when the object is clicked.
example: function SiteLibrary_DefaultPage$example() {var inch = 720.0;// Get the containervar container = this._automation.get_container();// Add a red on green rectangle from 1in 1in to 2in 2invar rectObj = new lt.Annotations.Core.AnnRectangleObject();rectObj.set_rect(lt.LeadRectD.create(1 * inch, 1 * inch, 1 * inch, 1 * inch));rectObj.set_stroke(lt.Annotations.Core.AnnStroke.create(lt.Annotations.Core.AnnSolidColorBrush.create("red"), lt.LeadLengthD.create(1)));rectObj.set_fill(lt.Annotations.Core.AnnSolidColorBrush.create("green"));// Set its hyperlinkrectObj.set_hyperlink("https://www.leadtools.com");// Add it to the containercontainer.get_children().add(rectObj);// Add a blue on yellow rectangle from 3in 3in to 4in 4invar rectObj = new lt.Annotations.Core.AnnRectangleObject();rectObj.set_rect(lt.LeadRectD.create(3 * inch, 3 * inch, 1 * inch, 1 * inch));rectObj.set_stroke(lt.Annotations.Core.AnnStroke.create(lt.Annotations.Core.AnnSolidColorBrush.create("blue"), lt.LeadLengthD.create(1)));rectObj.set_fill(lt.Annotations.Core.AnnSolidColorBrush.create("yellow"));rectObj.set_hyperlink("https://www.leadtools.com/downloads/demos.htm");// Add it to the containercontainer.get_children().add(rectObj);// Subscribe to the Run event of the automationthis._automation.add_run(function(sender, e) {// e is of type AnnRunDesignerEventArgs// Check for status == Endif (e.get_operationStatus() == lt.Annotations.Core.AnnDesignerOperationStatus.end) {// Get the annotation objectvar annObj = e.get_object();// Get its hyperlink stringvar hyperlink = annObj.get_hyperlink();// Browse to itif(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 modethis._automation.get_manager().set_userMode(lt.Annotations.Core.AnnUserMode.run);alert("Run mode, click on the rectangles to go to their hyperlinks");},
|
Products |
Support |
Feedback: hyperlink Property (AnnObject) - Leadtools.Annotations.Core |
Introduction |
Help Version 19.0.2017.3.21
|

Raster .NET | C API | C++ Class Library | JavaScript HTML5
Document .NET | C API | C++ Class Library | JavaScript HTML5
Medical .NET | C API | C++ Class Library | JavaScript HTML5
Medical Web Viewer .NET
Your email has been sent to support! Someone should be in touch! If your matter is urgent please come back into chat.
Chat Hours:
Monday - Friday, 8:30am to 6pm ET
Thank you for your feedback!
Please fill out the form again to start a new chat.
All agents are currently offline.
Chat Hours:
Monday - Friday
8:30AM - 6PM EST
To contact us please fill out this form and we will contact you via email.