- m_list->Arrange();
-
- // resize the list control and the page area to fit inside our new size
- const wxSize sizeClient = GetClientSize(),
- sizeBorder = m_list->GetSize() - m_list->GetClientSize(),
- sizeList = GetListSize();
-
- m_list->SetClientSize( sizeList.x - sizeBorder.x, sizeList.y - sizeBorder.y );
-
- const wxSize sizeNew = m_list->GetSize();
- wxPoint posList;
- switch ( GetWindowStyle() & wxLB_ALIGN_MASK )
- {
- default:
- wxFAIL_MSG( _T("unexpected wxListbook alignment") );
- // fall through
-
- case wxLB_TOP:
- case wxLB_LEFT:
- // posList is already ok
- break;
-
- case wxLB_BOTTOM:
- posList.y = sizeClient.y - sizeNew.y;
- break;
-
- case wxLB_RIGHT:
- posList.x = sizeClient.x - sizeNew.x;
- break;
- }
-
- if ( m_list->GetPosition() != posList )
- m_list->Move(posList);
-
-#if wxUSE_LINE_IN_LISTBOOK
- if ( m_line )
- {
- wxRect rectLine(sizeClient);
-
- switch ( GetWindowStyle() & wxLB_ALIGN_MASK )
- {
- case wxLB_TOP:
- rectLine.y = sizeNew.y + 1;
- rectLine.height = MARGIN - 2;
- break;
-
- case wxLB_BOTTOM:
- rectLine.height = MARGIN - 2;
- rectLine.y = sizeClient.y - sizeNew.y - rectLine.height;
- break;
-
- case wxLB_LEFT:
- rectLine.x = sizeNew.x + 1;
- rectLine.width = MARGIN - 2;
- break;
-
- case wxLB_RIGHT:
- rectLine.width = MARGIN - 2;
- rectLine.x = sizeClient.x - sizeNew.x - rectLine.width;
- break;
- }
-
- m_line->SetSize(rectLine);
- }
-#endif // wxUSE_LINE_IN_LISTBOOK
-
- // resize the currently shown page
- if (m_selection != wxNOT_FOUND )
- {
- wxWindow *page = m_pages[m_selection];
- wxCHECK_RET( page, _T("NULL page in wxListbook?") );
- page->SetSize(GetPageRect());
- }