Class: LinkOptions

Surface.LinkOptions()

new LinkOptions()

The Surface.LinkOptions class holds all options a link can display or own

Every option of the Surface.LinkOptions type has associated a property of the control. For instance, the option:

caption {string}, defines the link's caption
is associated with the property:
Caption {string}, defines the link's caption
which means that the following statements are equivalent:
oLink.Options = {caption: "name"}
oLink.SetOptions({caption: "name"})
oLink.Caption = "name"
oLink.SetCaption("name")
where oLink is an object of Link type

Members

(static) allowControlPoint :Surface.LinkControlPointEnum

The allowControlPoint field defines the control points for an individual link, the user can use to customize the link. A combination of one or more Surface.LinkControlPointEnum flags that determines the control points for an individual link, the user can use to customize the link. The Surface.LinkControlPointEnum type defines the following flags:
  • exNoControlPoint(0), the link displays no control points
  • exStartControlPoint(1), the link shows control point that changes the link's StartPos property (the exStartControlPoint point is marked with black squares)
  • exEndControlPoint(2), the link shows control point that changes the link's EndPos property (the exEndControlPoint point is marked with black squares)
  • exControlPoint(4), defines the corners of the link's path. You can remove a exControlPoint points by dragging to another, so intermediate exControlPoint points are removed. You can move all control points of the link at once, if SHIFT key is pressed (the exControlPoint points are marked black circles)
  • exMiddleControlPoint(8), defines the link's middle control points that are displayed between two exControlPoint points, to let the use add new exControlPoint points, to redefine the link's path (The exMiddleControlPoint points are marked with gray circles)
  • exOrthoArrange(0x10), specifies that the lines of the link are orthogonal arranged when the user drags and drops the middle or control-points of the path (excludes the start/end control-points)
Type:
Example
0 or exontrol.Surface.LinkControlPointEnum.exNoControlPoint {number}, displays no link's control points
 3 or exontrol.Surface.LinkControlPointEnum.exStartControlPoint | exontrol.Surface.LinkControlPointEnum.exEndControlPoint {number}, displays link's start and end control points only

(static) caption :string

The caption field defines the link's caption.
Type:
  • string
Example
null {null}, indicates no caption
 "caption" {string}, declares a plain-caption
 "<b>text</b>" {string}, displays the text in bold
 "<img>logo</img>" {string}, displays the "logo" image. The image can be added using the exontrol.HTMLPicture.Add() method
The collapsedLink field specifies the appearance of the link between collapsed elements.
Type:

(static) customPath :string

The customPath field defines the link's custom path, as a string of x,y proportions separated by comma. Specifies the proportions of link's control-points, as a "x,y,x,y,x,y,...". The x, y are proportions of link's control-points relative to the start/end points of the link. The 0,0 indicates the link's start point, while 1,1 indicates the link's end point.
Type:
  • string
Example
"0.5,0,0.5,1" defines the link to go from start (0,0) to (0.5,0), then (0.5,1), and finally to the end (1,1)

(static) from :any

The from field indicates the index, identifier/key or reference of the element the link starts from (in-element) The from field could be any of the following:
  • from {number}, indicates a numeric value that defines the index of the element
  • from {string}, specifies a string expression that defines the identifier/key/plain-caption of the element
  • from {Element}, specifies the object reference to the element
Type:
  • any

(static) key :string

The key field specifies the key associated with the link. If no key is provided, the link's plain-caption can be used to request an item. The plain-caption includes no ex-HTML tags, such as <b>, <fgcolor> and so on
Type:
  • string
Example
"logo" {string}, defines the link with the giving key (logo). You can use the Root.Item("logo") method to request the link giving its key.
The link field specifies the appearance of the link between elements.
Type:

(static) to :any

The to field indicates the index, identifier/key or reference of the element the link ends to (out-element) The to field could be any of the following:
  • to {number}, indicates a numeric value that defines the index of the element
  • to {string}, specifies a string expression that defines the identifier/key/plain-caption of the element
  • to {Element}, specifies the object reference to the element
Type:
  • any

(static) visible :boolean

The visible field indicates whether the link is visible or hidden.
Type:
  • boolean
Example
false {boolean}, hides the link
 true {boolean}, shows the link