Add wxTreeCtrl::GetStateImageCount() and HasStateImages()
Add these functions for consistency with SetStateImages() and to avoid using GetStateImageList() in the treectrl sample, which can now use GetStateImageCount() instead.
This commit is contained in:
parent
a5449a94a1
commit
f9a22962e0
3 changed files with 34 additions and 1 deletions
|
|
@ -1288,7 +1288,7 @@ void MyTreeCtrl::DoToggleState(const wxTreeItemId& item)
|
|||
|
||||
srand (time(nullptr));
|
||||
do {
|
||||
nState = rand() % GetStateImageList()->GetImageCount();
|
||||
nState = rand() % GetStateImageCount();
|
||||
} while (nState == state);
|
||||
|
||||
SetItemState(item, nState);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue