Skip to content

LinkView

The LinkView control is used to display a static text containing one or more links (Label).
The LinkView inherits all the methods and properties from the base class View.

Constructor:

  • constructor(parent: View)
    Creates an instance of LinkView control.
    • parent: the View containing the control itself.

Properties:

  • text: string
    The text with link(s) to be displayed in the view.
      var link = new LinkView(this);
      link.text = 'Some text containing a <a href="www.nodeacta.com">link<a>';
      link.link((link)=> os.exec(link));
    
  • textAlignment: Alignment
    Defines the horizontal alignment of the text within the view. See Alignment.
    Hint: Only Alignment.Left and Alignment.Right are supported.
  • autoSize: boolean
    Determines whether the control automatically adjusts its size to fit the text. Default is false.

Methods:

  • link(handler: (url)=> boolean)
    Listen control’s link click events.