<div class="meta" robots="noindex">

</div>

# ListBox.Heading(index as integer)

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

<div class="warning">

<div class="title">

Warning

</div>

This item was deprecated in version 2019r2. Please use `DesktopListBox.HeaderAt<desktoplistbox.headerat>` as a replacement.

</div>

## Description

Zero-based array of column headings. Headings appear only if HasHeading is `True</api/language/true>`.

## Notes

If you assign values to both Heading and InitialValue, the first row of InitialValue is interpreted as the first row of data; otherwise, it is used as the heading and the second row of InitialValue is used as the first row of data.

You can set the headings in a multi-column listbox by assigning to Heading(-1) the text of the headings separated by the tab character, e.g.,

``` xojo
Me.Heading(-1) = "FirstName" + Chr(9) + "LastName"
```

You must use a space if you want an empty header; empty strings will use the default header.

``` xojo
ListBox1.Heading(-1) = "" ' sets all headers of ListBox1 to their defaults.
ListBox1.Heading(5) = "" ' sets column 5's heading to its default heading
ListBox1.Heading(5) = " " ' sets column 5's heading to empty.
```

## Sample code

This example populates a three-column ListBox with headings:

``` xojo
ListBox1.HasHeading = True
ListBox1.Heading(0) = "ID"
ListBox1.Heading(1) = "JobTitle"
ListBox1.Heading(2) = "Name"
```

## Compatibility

All projects types on all supported operating systems.

## See also

`ListBox</api/deprecated/listbox>` parent class
