diff --git a/wx/lib/agw/ultimatelistctrl.py b/wx/lib/agw/ultimatelistctrl.py index 7cbff21e..19f8c69c 100644 --- a/wx/lib/agw/ultimatelistctrl.py +++ b/wx/lib/agw/ultimatelistctrl.py @@ -9430,6 +9430,19 @@ class UltimateListMainWindow(wx.ScrolledWindow): # item count # ---------------------------------------------------------------------------- + def GetCheckedItemCount(self, col=0): + """ + Returns the number of checked items in the given column. + + :param col: an integer specifying the column index. + :returns: the number of checked items. + :rtype: int + """ + + GetLine = self.GetLine # local optimization + return len([line for line in range(self.GetItemCount()) if GetLine(line).IsChecked(col)]) + + def GetItemCount(self): """ Returns the number of items in the :class:`UltimateListCtrl`. """ @@ -11182,6 +11195,18 @@ class UltimateListCtrl(wx.Control): return self._mainWin.GetUserLineHeight() + def GetCheckedItemCount(self, col=0): + """ + Returns the number of checked items in the given column. + + :param 'col': an integer specifying the column index. + :returns: the number of checked items. + :rtype: int + """ + + return self._mainWin.GetCheckedItemCount(col) + + def GetColumn(self, col): """ Returns information about this column.