- m_list->SetSize(posList.x, posList.y, sizeList.x, sizeList.y);
-
+ // arrange the icons before calling SetClientSize(), otherwise it wouldn't
+ // account for the scrollbars the list control might need and, at least
+ // under MSW, we'd finish with an ugly looking list control with both
+ // vertical and horizontal scrollbar (with one of them being added because
+ // the other one is not accounted for in client size computations)
+ m_list->Arrange();
+ if ( m_list->GetPosition() != posList )
+ m_list->Move(posList.x, posList.y);
+ m_list->SetClientSize(sizeList.x, sizeList.y);
+
+#if wxUSE_LINE_IN_LISTBOOK