BackgroundOptions class (Gantt)

BackgroundOptions()

new BackgroundOptions()

The BackgroundOptions object defines options to show different parts of the control. The Background property access the control's background options of BackgroundOptions type. The Background property overrides the previous background options of the control, so it can be used to show different parts of the control. For instance, you can use the Background property to show the links being selected within an editable predecessor/successor column, or to show the incoming/outgoing bars of the links being selected within an editable predecessor/successor column.

For instance, the "psLinkEditSel" option:

background: { psLinkEditSel: { color: "red" } }
changes the color to highlight the links being selected within an editable predecessor/successor column

Additionally, the BackgroundOptions type inherits all values of the Tree.BackgroundOptions type

Since:
  • 2.3

Members

(static) psBarShapeEditSel :any

The psBarShapeEditSel field specifies the shape to highlight the incoming/outgoing bars of the links being selected within an editable predecessor/successor column. The valueToItemBarProperty: "predecessor" or valueToItemBarProperty: "successor" defines a predecessor/successor column. The Predecessor/GetPredecessor()/SetPredecessor(value) property defines the list of predecessor bars, separated by comma. The Successor/GetSuccessor()/SetSuccessor(value) property defines the list of successor bars, separated by comma. The psBarShapeEditSel field can be any of the following:
  • the shape's name within the exontrol.Shapes.Tree or exontrol.Shapes namespace
  • a CSS color
  • a JSON string-representation of an object of exontrol.Def.Shape type, for the column itself
  • an object of {normal,hover,click,disabled} type. The normal, hover, click and disabled are objects of exontrol.Def.Shape type
Type:
  • any
Since:
  • 2.3
Example
"" {string}, null {null}, no shape is applied
"red" {string}, fills the object's background in red (CSS color)
'{"fillColor": "red"}' or '{"normal":{"fillColor": "red"}}' {string}, fills the object's background in red (JSON-representation of an object of exontrol.Def.Shape type)
"xxx" {string}, indicates that exontrol.Shapes.Pivot.xxx or exontrol.Shapes.xxx is applied on the object's background. If the xxx field is missing, no custom shape is applied (no default object's shape is be applied)
"Button" or exontrol.Shapes.Button {object}, applies the "Button" shape on the object as defined into exontrol.Shapes namespace (@since 5.2)
psBarShapeEditSel

(static) psLinkEditSel :DisplayLinkType

The psLinkEditSel field specifies the appearance to highlight the links being selected within an editable predecessor/successor column. The valueToItemBarProperty property on "predecessor" or valueToItemBarProperty property to "successor" defines a predecessor/successor column. The Predecessor/GetPredecessor()/SetPredecessor(value) property defines the list of predecessor bars, separated by comma. The Successor/GetSuccessor()/SetSuccessor(value) property defines the list of successor bars, separated by comma. The psLinkEditSel object includes any of the following:
  • type {exontrol.LinkTypeEnum}, specifies the type of the link as 0 (rectangular), 1 (direct), 2(straight) or 3(round)
  • dir {number}, specifies whether the link's direction is shown or hidden as 0 (hidden), 1(shows the direction/arrow where the link begins), 2(shows the direction where the link ends, default) or 3 shows the arrows in both sides
  • width {number}, specifies the link's width or size (1 by default)
  • color {string}, indicates the link's color (partial-black by default)
  • arrow {string}, indicates the arrow's color. If it is missing or not specified the arrow is shown using the link's color (gray by default)
  • arrowSize {number}, indicates the arrow's size. If it is missing or not specified the arrow's size is defined by link's width (1 by default) (since 2.2)
  • arrowShape {object}, defines an object of exontrol.Def.Shape type to customize the shape of the link's arrow (for instance shows the link's arrow as a circle instead of a triangle) (since 2.2)
  • style {array}, specifies the link's dash pattern to show the lines (solid by default)
  • startPos {any}, indicates the list of corners of in-element, the link can start from
  • endPos {any}, indicates the list of corners of out-element, the link can end to
Type:
Since:
  • 2.3
Example
The following sample defines "round" links shown in red:
{
   type: 3,
   color: "red"
}
psLinkEditSel