Document that wxListCtrl::SetItemState() sends events
This is an exception to the usual rule, so should be documented, do it for both this method itself and wxListView::Select() using it.
This commit is contained in:
@@ -1148,6 +1148,10 @@ public:
|
|||||||
|
|
||||||
Consider using wxListView if possible to avoid dealing with this
|
Consider using wxListView if possible to avoid dealing with this
|
||||||
error-prone and confusing method.
|
error-prone and confusing method.
|
||||||
|
|
||||||
|
Also notice that contrary to the usual rule that only user actions
|
||||||
|
generate events, this method does generate wxEVT_LIST_ITEM_SELECTED
|
||||||
|
event when it is used to select an item.
|
||||||
*/
|
*/
|
||||||
bool SetItemState(long item, long state, long stateMask);
|
bool SetItemState(long item, long state, long stateMask);
|
||||||
|
|
||||||
@@ -1631,12 +1635,15 @@ public:
|
|||||||
/**
|
/**
|
||||||
Selects or unselects the given item.
|
Selects or unselects the given item.
|
||||||
|
|
||||||
|
Notice that this method inherits the unusual behaviour of
|
||||||
|
wxListCtrl::SetItemState() which sends a wxEVT_LIST_ITEM_SELECTED event
|
||||||
|
when it is used to select an item, contrary to the usual rule that only
|
||||||
|
the user actions result in selection.
|
||||||
|
|
||||||
@param n
|
@param n
|
||||||
the item to select or unselect
|
the item to select or unselect
|
||||||
@param on
|
@param on
|
||||||
if @true (default), selects the item, otherwise unselects it
|
if @true (default), selects the item, otherwise unselects it
|
||||||
|
|
||||||
@see wxListCtrl::SetItemState
|
|
||||||
*/
|
*/
|
||||||
void Select(long n, bool on = true);
|
void Select(long n, bool on = true);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user