# DialogListItem

The **DialogListItem** object represents an item in a *combo box* or *list box* control in a [script dialog](https://chaoses-ib.gitbook.io/directory-opus/manual/scripting/script_dialogs). It's returned by the [**Control**](https://chaoses-ib.gitbook.io/directory-opus/manual/reference/scripting_reference/scripting_objects/control)**.GetItemAt** and [**Control**](https://chaoses-ib.gitbook.io/directory-opus/manual/reference/scripting_reference/scripting_objects/control)**.GetItemByName** methods.

| Property Name | Return Type         | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| ------------- | ------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| bg            | *string*            | <p>Set or query the color used for the background (fill) of this item. This is in the format <em>#RRGGBB</em> (hexadecimal) or <em>RRR,GGG,BBB</em> (decimal).<br>Currently only items in <em>list view</em> controls are supported for this property.</p>                                                                                                                                                                                                                                                                                               |
| checked       | *int*               | <p>For a <em>list view</em> control with checkboxes enabled, returns or sets the check state of the item.<br>Check states are <strong>0</strong> (unchecked), <strong>1</strong> (checked), <strong>2</strong> (indeterminate), <strong>3</strong> (unchecked/disabled), <strong>4</strong> (checked/disabled), <strong>5</strong> (indeterminate/disabled).</p>                                                                                                                                                                                         |
| data          | *int*               | Returns or sets the optional data value associated with this item.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| disabled      | *bool*              | For a *list view* control, returns or sets the disable state of this item. When a *list view* item is disabled it appears ghosted and can't be selected or right-clicked.                                                                                                                                                                                                                                                                                                                                                                                |
| fg            | *string*            | <p>Set or query the color used for the text (foreground) of this control. This is in the format <em>#RRGGBB</em> (hexadecimal) or <em>RRR,GGG,BBB</em> (decimal).<br>Currently only items in <em>list view</em> controls are supported for this property.</p>                                                                                                                                                                                                                                                                                            |
| group         | *int*               | Returns or sets the *list view* group that this item is a member of.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| icon          | *string*            | For a *list view* control, returns or sets the icon associated with this item. You can specify the path of a file or folder to use its icon, or a file extension (e.g. ".txt") to use a generic filetype icon. You can also set it to "dir", "file", "ftp" and "ftps" to use generic icons. You can also extract an icon from a DLL or EXE by providing the path of the file followed by a comma and then the icon index within the file.                                                                                                                |
| index         | *index*             | <p>Returns the 0-based index of this item within the control.</p><p>For a combo edit box, this will return <strong>-1</strong> if the user typed in a string rather than selecting one from the list. The string they entered can be retrieved from the <strong>name</strong> property.</p>                                                                                                                                                                                                                                                              |
| name          | *string*            | Returns or sets the item's name.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| selected      | *bool*              | Returns or sets the item's selection state. Mostly useful with multiple-selection *list box* controls.                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| style         | *string*            | <p>Returns or sets the text style this item will be displayed in. You should provide a string containing one or more of the following flags: "b" (bold), "i" (italics), "u" (underline).<br>Currently only items in <em>list view</em> controls are supported for this property.</p>                                                                                                                                                                                                                                                                     |
| subitems      | *collection:string* | <p>For a list view control in <em>Details</em> mode, returns a collection of strings that lets you query or change the text of the item's sub-items. There will be one string in the collection for each column in the list, excluding the first column.</p><p>For example, assuming the list has three columns in total, the string for the first column would be set using the <strong>name</strong> property above. The strings for the second and third columns would be set with <strong>subitems(0)</strong> and <strong>subitems(1)</strong>.</p> |
