SubItem Object

A SubItem object represents an item in the SubItems collection of a ListView item.

Client support

   Newlook Smartclient only.

Use

A ListItem object can consist of text and a tag. Each ListItem can have an array of subItems associated with it to provide further information to the user.

Example

The following JScript example adds a new ColumnHeader object and SubItems to an existing ListView control named "MyListView".

//Add a new columns for Department to the list view control

 

function AddDepartmentColumn ()

{

App.ActiveForm.MyListView.ColumnHeaders.Add(1,"Dept",0,55);

App.ActiveForm.MyListView.ListItems(0).SubItems(0).Text = "HR";

App.ActiveForm.MyListView.ListItems(1).SubItems(0).Text = "FIN";

App.ActiveForm.MyListView.ListItems(2).SubItems(0).Text = "HR";

}

See Also

Objects and Controls | ListItems property | ListItems collection | SubItems collection

Applies To

ListItem object


© 2004-2021 looksoftware. All rights reserved.