mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2026-01-07 04:20:07 +01:00
Merge pull request #1631 from topic2k/ulc_get_checked_item_count
[ULC] add method GetCheckedItemCount
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user