Options class (Rollist)

Rollist.Options()

new Options()

The Rollist.Options type represents a set of configurable settings that can be applied to a control. These options allow you to customize the control's behavior and appearance. You can assign options to a control either by setting the Options property directly or by using the SetOptions() method, which provides a programmatic way to update one or more options at runtime.

Every option of the Rollist.Options type has associated a property of the control. For instance, the option:

allowActions {string}, customizes the actions the user can perform once the user clicks or touches the control
is associated with the property:
AllowActions {string}, customizes the actions the user can perform once the user clicks or touches the control
which means that the following statements are equivalent:
oRollist.Options = {allowActions: "scroll"}
oRollist.SetOptions({allowActions: "scroll"})
oRollist.AllowActions = "scroll"
oRollist.SetAllowActions("scroll")
where oRollist is an object of Rollist type

Members

(static) allowActions :string

The allowActions field defines a list of actions separated by comma that the user can perform by drag or click on the control's content. The order of the actions is very important, as the control checks each action from left to right until it finds a matching action for the performed mouse/touch event. The first matched action is performed, and the rest of the actions are ignored. So if you want to perform a specific action once the user clicks an item, and perform another action if the user clicks an area that does not contain any item, you should place the first action before the second one in the AllowActions property.

The format of the property is:

"action(shortcut,shortcut,...),action(shortcut,shortcut,...)..."
where
  • "action", defines the action to perform (as defined below)

    Action Description Flags
    "scroll" Scrolls the control by drag and drop

  • "shortcut", defines the event's button or/and the modifier-keys that are required to perform the action. The "shortcut" is a combination of none, one or more of the following values:
    • "Shift", indicates that the SHIFT key is pressed
    • "Ctrl" or "Control", indicates that the CTRL key is pressed
    • "Alt" or "Menu", indicates that the ALT key is pressed
    • "Meta" , indicates that the META key is pressed
    • "LButton", specifies that the mouse's left-button is pressed
    • "RButton", specifies that the mouse's right-button is pressed
    • "MButton", specifies that the mouse's middle/wheel-button is pressed
    • "Long", specifies that the action requires a "long" click or touch before it begins
    • "Double", specifies that the action requires a "double" click before it begins (this flag is available for non-dragable actions only such as "edit")
    • "+", indicates AND between values
Type:
  • string
Example
null {null}, indicates the control's default allowActions value
"" {string}, specifies that no operation is allowed once the user clicks or touches the control
"scroll" {string}, specifies that only "scroll" operation is allowed, no matter of the event's button or modifier-keys is pressed.
allowActions

(static) allowFilterInput :Rollist.AllowFilterInputEnum

The allowFilterInput field specifies whether the control displays a filter bar, enabling the user to filter items by typing text.
Type:
Example
null {null} or "hide" {string} or exontrol.Rollist.AllowFilterInputEnum.exHide {AllowFilterInputEnum} or 0 {number}, no filter input is visible (by default)
"always" {string} or exontrol.Rollist.AllowFilterInputEnum.exAlwaysVisible {AllowFilterInputEnum} or 1 {number}, indicates that the filter input is always visible
"key,disable" {string} or (exontrol.Rollist.AllowFilterInputEnum.exShowOnAnyKey | exontrol.Rollist.AllowFilterInputEnum.exDisableHighlightOccurences) {AllowFilterInputEnum} or 0x12 {number}, shows the filter input when the user presses any key and disables the highlighting of all occurrences of the typed text in the items
allowFilterInput

(static) cyclic :boolean

The cyclic field indicates whether the items are displayed in a continuous loop.
Type:
  • boolean
Example
false {boolean}, no effect (by default)
true {boolean}, specifies that the items are displayed in a continuous loop
cyclic

(static) data :any

The data field defines the source the control imports data from, as one of the following: A String expression that specifies the URL to a CSV file (contains no eof, eor or str) A String expression in CSV format An object that includes the "files" member of FileList type (a local file) An array of data to load.
Type:
  • any
Example
"sample.csv" {string}, imports data from sample.csv file
data

(static) filter :any

The filter field specifies the filter to be applied to the items, ensuring that only items matching the filter criteria are shown.
Type:
  • any
Example
null {null} or "" {string}, clears the fiter if any
"icon" {string}, displays only items that include the word 'icon' in their content
filter

(static) misc :MiscellaneousOptions

The misc field holds the control's miscellaneous options, as an object of MiscellaneousOptions type.
Type:
misc

(static) select :any

The select field defines the position of the item that is currently selected, which is always displayed at the center of the control.
Type:
  • any
Example
0 {number} or null {null}, selects the first item based on its position in the Items collection (0-based)
Item(0) {Item}, selects the first item by index from the Items collection
select

(static) smooth :number

The smooth field defines the time in ms the control goes from one layout to another.
Type:
  • number
Example
0 {number}, no smooth changes once the control goes from a layout to another
125 {number}, specifies that a smooth-transition is performed from a layout to another for 125 ms.
smooth

(static) wheelChange :number

The wheelChange field specifies how much the control scrolls when the user rotates the mouse wheel. This setting allows you to adjust the sensitivity of the mouse wheel interaction with the control.
  • Setting wheelChange to 0 disables mouse wheel actions, preventing the control from changing when the wheel is scrolled
  • Setting wheelChange to a positive number, such as 5, increases the control's value by that amount each time the wheel is rotated, enabling faster adjustments

By modifying this value, you can fine-tune the control's responsiveness, making it easier for users to perform precise changes or larger adjustments as needed.

The wheelChange field is mapped to the WheelChange property, which means that the following statements are equivalent:

oRollist.Options = {wheelChange: 5}
oRollist.SetOptions({wheelChange: 5})
oRollist.WheelChange = 5
oRollist.SetWheelChange(5)
Type:
  • number
Example
0 {number}, locks any action the mouse's wheel performs
1 {number}, scrolls the control by 1-item when mouse's wheel is rotated
wheelChange