Added wxBookCtrlBase::FindPage().
Add helper function to find the index of the given page. Closes #15125. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73734 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -431,6 +431,18 @@ int wxBookCtrlBase::GetNextPage(bool forward) const
|
||||
return nPage;
|
||||
}
|
||||
|
||||
int wxBookCtrlBase::FindPage(const wxWindow* page) const
|
||||
{
|
||||
const size_t nCount = m_pages.size();
|
||||
for ( size_t nPage = 0; nPage < nCount; nPage++ )
|
||||
{
|
||||
if ( m_pages[nPage] == page )
|
||||
return (int)nPage;
|
||||
}
|
||||
|
||||
return wxNOT_FOUND;
|
||||
}
|
||||
|
||||
bool wxBookCtrlBase::DoSetSelectionAfterInsertion(size_t n, bool bSelect)
|
||||
{
|
||||
if ( bSelect )
|
||||
|
||||
Reference in New Issue
Block a user