X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8ba7c77150d74a5385f2385e5448ca491263179f..a14132e13a1b11383de5cd847be8afc7e541598d:/include/wx/ctrlsub.h diff --git a/include/wx/ctrlsub.h b/include/wx/ctrlsub.h index 1736c324e6..c7cddfe660 100644 --- a/include/wx/ctrlsub.h +++ b/include/wx/ctrlsub.h @@ -65,6 +65,11 @@ public: // reads better for multi-selection ones void Select(int n) { SetSelection(n); } + +protected: + + // check that the index is valid + inline bool IsValid(int n) const { return n >= 0 && n < GetCount(); } }; class WXDLLEXPORT wxItemContainer : public wxItemContainerImmutable