Package Win32::GUI::ListView

Back to the Packages


Constructor

new Win32::GUI::ListView(PARENT, %OPTIONS)

Creates a new ListView object; can also be called as PARENT->AddListView(%OPTIONS).


Methods

Arrange([FLAG])

Arranges items in the ListView; the optional FLAG parameter can be one of the following values:

  0 uses the current alignment style (this is the default)
  1 align items along the left edge of the window
  2 align items along the top edge of the window
  5 snaps icons to the nearest grid position

ChangeItem(%OPTIONS)

[TBD]

Clear()

Deletes all items from the ListView.

ColumnWidth(COLUMN, [WIDTH])

Gets or sets the width of the specified COLUMN; WIDTH can be the desired width in pixels or one of the following special values:

  -1 automatically size the column
  -2 automatically size the column to fit the header text

Count()

Returns the number of items in the ListView.

DeleteColumn(INDEX)

[TBD]

DeleteItem(INDEX)

Removes the zero-based INDEX item from the ListView.

EditLabel(INDEX)

[TBD]

EnsureVisible(INDEX, [FLAG])

[TBD]

GetFirstVisible()

Returns the index of the first visible item in the ListView.

GetStringWidth(STRING)

Returns the width, in pixels, needed to display the specified STRING in the ListView area.

HitTest(X, Y)

Checks if the specified point in the ListView area is occupied by an item; it returns the index of the found item or zero if none was found. If called in an array context, it returns an additional value containing more info about the position of the specified point.

InsertColumn(%OPTIONS)

[TBD]

InsertItem(%OPTIONS)

[TBD]

ItemCheck(INDEX)

Gets the check state of a ListView item (valid only if the control was created with the -checkboxes => 1 option).

ItemPosition(INDEX, [X, Y])

Moves the specified zero-based INDEX item to the specified position, or returns its current X and Y position if X and Y are not given. See also MoveItem()

MoveItem(INDEX, X, Y)

Moves the specified zero-based INDEX item to the specified position, if the ListView is in big or small icon view mode; X and Y coordinates are relative to the ListView client area.

Select(INDEX)

[TBD]

SelectCount()

Returns the number of currently selected items.

SetImageList(IMAGELIST, [TYPE])

[TBD]

SetItem(%OPTIONS)

See ChangeItem().

TextBkColor([COLOR])

Gets or sets the background color for the text in the ListView.

TextColor([COLOR])

Gets or sets the text color for the ListView.

View([MODE])

Gets or sets the viewing mode of the ListView control; the returned or given MODE can have one of the following values:

  0  big icons
  1  details
  2  small icons
  3  list

VisibleCount()

Returns the number of items that can be fully visible in a page of the ListView control; if the current view state is big or small icons, the function returns the total number of items in the control.


Events

ColumnClick(ITEM)

Sent when the user clicks on a column header in the ListView; ITEM specifies the one-based index of the selected column.

ItemClick(ITEM)

Sent when the user selects an item in the ListView; ITEM specifies the zero-based index of the selected item.

KeyDown(KEY)

Sent when the user presses a key while the ListView control has focus; KEY is the ASCII code of the key being pressed.