Class: ItemOptions

ItemOptions()

new ItemOptions()

The ItemOptions type holds all options an Item can display or own

Every option of the ItemOptions type has associated a property of the Item object. For instance, the option:

cursor {string}, defines the mouse-cursor for individual item
is associated with the property:
Cursor {string}, defines the mouse-cursor for individual item
which means that the following statements are equivalent:
oItem.Options = {cursor: "pointer"}
oItem.SetOptions({cursor: "pointer"})
oItem.Cursor = "pointer"
oItem.SetCursor("pointer")
where oItem is an object of Item type

Members

(static) allowSizing :boolean

The allowSizing field specifies whether the item is resizable or fixed
Type:
  • boolean
Example
null {null}, the control's itemAllowSizing field specifies whether the item is resizable or fixed
 false {boolean}, the item is fixed
 true {boolean}, the item is resizable, so user can resize the item by drag (if "item-resize" action is allowed)

(static) cursor :string

The cursor field defines the mouse-cursor for individual item.
Type:
  • string
Example
"pointer" {string}, The cursor is a pointer that indicates a link (typically an image of a pointing hand)

(static) divider :any

The divider field shows the item as a divider (an divider-item shows a cell only)
Type:
  • any
Example
null {null}, multiple-columns item (no divider-item)
 0 {number}, divider-item that always displays the cell with the index 0
 "xxx" {string}, divider-item that always displays the cell on the column "xxx" (key or plain-caption)

(static) enabled :boolean

The enabled field indicates whether the item is enabled or disabled
Type:
  • boolean
Example
false {boolean}, disables the item
 true {boolean}, enables the item

(static) expanded :boolean

The expanded field indicates whether the item is expanded or collapsed.
Type:
  • boolean
Example
false {boolean}, the item is collapsed
 true {boolean}, the item is expanded (item's children are shown)
 

(static) height :number

The height field defines the item's height. If height field is not specified, the control's defaultItemHeight field defines the item's height.
Type:
  • number
Example
null {null}, indicates that the item's height is defined by the control's defaultItemHeight field (22)
 18 {number}, specifies the item's height to 18

(static) key :string

The key field specifies the key associated with the item. Specifies the key associated with the item. If no key is provided, the item'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 item with the giving key (logo). You can use the Root.Item("logo") method to request the item giving its key.

(static) parent :number|string|Item

The parent field defines the item's parent. The parent field can be one of the following:
  • parent {number}, indicates a numeric value that defines the index of the parent's item (0-based)
  • parent {string}, specifies a string expression that defines the identifier/key of the parent's item
  • parent {Item}, specifies the object reference to the parent's item
Type:
  • number | string | Item
Example
0 {number}, indicates that the item with the index 0 is the parent of the current item
 "key" {string}, specifies that the parent of the current item is the item with the giving key

(static) selectable :boolean

The selectable field indicates whether the item is selectable or unselectable
Type:
  • boolean
Example
false {boolean}, the item is unselectable
 true {boolean}, the item is selectable

(static) selected :boolean

The selected field indicates whether the item is selected or unselected
Type:
  • boolean
Example
false {boolean}, the item is unselected
 true {boolean}, the item is selected

(static) shape :any

The shape field defines the shape for individual item. The shape field can be any of the following:
  • the shape's name within the exontrol.Shape.Tree or exontrol.Shape 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
Example
null {null}, no custom shape is applied (default object's shape may be applied)
 "" {string}, no custom shape is applied (no default object's shape is be 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.Tree.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)
 exontrol.Shapes.Button {object}, applies the "Button" shape on the object as defined into exontrol.Shapes namespace

(static) showExpand :boolean

The showExpand field specifies whether the item displays its expand/collapse glyphs.
Type:
  • boolean
Example
false {boolean}, the item hides its expand/collapse glyphs (no indentation is applied)
 true {boolean}, the item shows its expand/collapse glyphs (indentation is applied)
 -1 {number}, the item shows no expand/collapse glyphs, instead indentation is applied

(static) sortable :boolean

The sortable field indicates whether the item is sortable or unsortable
Type:
  • boolean
Example
false {boolean}, the item is unsortable (an unsortable item keeps its position after user performs a sort operation)
 true {boolean}, the item is sortable

(static) value :any

The value field defines the value(s) of first cell(s) once the item is added. Defines the value of the first cell(s). The value field has effect only while using with the Add({value}) method of exontrol.Tree.Items or Item type. If the value is an array, it specifies the values for cells within the item to be added, else it specifies the value for the first-cell (the cell with the index 0)
Type:
  • any
Example
Add("caption") {Item}, adds a new item, and sets the caption for the first cell.
 Add({value: "caption"}) {Item}, adds a new item, and sets the caption for the first cell.
 Add(["Cell 1","Cell 2"]) {Item}, adds a new item, and sets the caption for the first and second cell.
 Add({value: ["Cell 1","Cell 2"]}) {Item}, adds a new item, and sets the caption for the first and second cell.

(static) visible :boolean

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