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:
value {string}, defines the value for individual itemis associated with the property:
Value {any}, defines the value for individual itemwhich means that the following statements are equivalent:
oItem.Options = {value: 100}where oItem is an object of Item type
oItem.SetOptions({value: 100})
oItem.Value = 100
oItem.SetValue(100)
Members
(static) className :string
The className field specifies an additional class name to apply to the HTML element that hosts the item. By default, the 'exrolitem' class name is applied to the HTML element that hosts the roll item.
Type:
- string
Example
null {null} or "" {string}, no extra class name applied
"red" {string}, appends 'red' to the HTML element's class name, applying the .red style to the item
className
(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 Items.Item("logo") method to request the item giving its key.
key
(static) position :number
The position field specifies the item's position.
Type:
- number
Example
null {null}, the null value has no effect
0 {number}, moves the item on the first position
position
(static) value :any
The value field defines the value of the item.
Type:
- any
Example
Add("caption") {Item}, adds the "caption" item
Add({value: "caption"}) {Item}, adds the "caption" item
value
(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
visible