Determining Whether a Hyperlink in an HTML-coded Label Text has been Clicked

Tips & Tricks

Summary

Support for hyperlinks in HTML-encoded label text.

This article was written for an older version. It is only online as a reference for customers using this old version. The information it contains is probably out of date.

The latest information can be found in the yFiles documentation

Description

If a label text is specified using HTML, i.e., starting with the <html> prefix, the attached demo presents how an application can determine whether one of the hyperlinks has been clicked.

The demo uses a customized view mode to listen for clicks, performs a hit test on labels, and then determines on what HREF element within the HTML label the click actually occurred on.

Resources

Categories this article belongs to:
yFiles for Java > yFiles Viewer > Displaying and Editing Graphs > Realizer-Related Features
Applies to:
yFiles for Java 2: 2.5, 2.6, 2.7, 2.8
Keywords:
hyperlink - hit - hit-test - HTML - label - href - view - mode - view mode - click