pyWinAuto: pywinauto.controls.common_controls.ListViewWrapper -- Class that wraps Windows ListView common control

ListViewWrapper

Class that wraps Windows ListView common control

This class derives from HwndWrapper - so has all the methods o that class also

see HwndWrapper.HwndWrapper


Attributes

a handle

None

a windowclasses

['SysListView32', 'WindowsForms\\d*\\.SysListView32\\..*']

a friendlyclassname

'ListView'

Methods

f __init__(self, hwnd) ...

Initialise the instance

f ColumnCount(self) ...

Return the number of columns

f ItemCount(self) ...

The number of items in the ListView

f GetHeaderControl(self) ...

Returns the Header control associated with the ListView

f GetColumn(self, col_index) ...

Get the information for a column of the ListView

f Columns(self) ...

Get the information on the columns of the ListView

f ColumnWidths(self) ...

Return a list of all the column widths

f GetItemRect(self, item_index) ...

Return the bounding rectangle of the list view item

f GetItem(self, item_index, subitem_index=0) ...

Return the item of the list view"

  • item_index Can be either the index of the item or a string with the text of the item you want returned.
  • subitem_index The 0 based index of the item you want returned. Defaults to 0.

f Items(self) ...

Get all the items in the list view

f Texts(self) ...

Get the texts for the ListView control

f UnCheck(self, item) ...

Uncheck the ListView item

f Check(self, item) ...

Check the ListView item

f IsChecked(self, item) ...

Return whether the ListView item is checked or not

f IsSelected(self, item) ...

Return True if the item is selected

f IsFocused(self, item) ...

Return True if the item has the focus

f Select(self, item) ...

Mark the item as selected

The ListView control must be enabled and visible before an Item can be selected otherwise an exception is raised

f Deselect(self, item) ...

Mark the item as not selected

The ListView control must be enabled and visible before an Item can be selected otherwise an exception is raised

f GetSelectedCount(self) ...

Return the number of selected items

f __eq__(self, other) ...

Returns True if the handles of both controls are the same

See the source for more information.