# DialogListItem

The **DialogListItem** object represents an item in a _combo box_ or _list box_ control in a [script dialog](../../../scripting/script_dialogs). It's returned by the [**Control**](control)**.GetItemAt** and [**Control**](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> |
