From: Vadim Zeitlin Date: Sun, 6 Jul 2003 21:54:08 +0000 (+0000) Subject: documented Fit() brokenness if sizers are not used X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/b19d494be1439a0d9fc6615424dba1d990c89ff1 documented Fit() brokenness if sizers are not used git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@21724 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/docs/latex/wx/window.tex b/docs/latex/wx/window.tex index 4ae3e95a97..5ed98dce2b 100644 --- a/docs/latex/wx/window.tex +++ b/docs/latex/wx/window.tex @@ -522,7 +522,16 @@ The search is recursive in both cases. \func{virtual void}{Fit}{\void} Sizes the window so that it fits around its subwindows. This function won't do -anything if there are no subwindows. +anything if there are no subwindows and will only really work correctly if the +sizers are used for the subwindows layout. Also, if the window has exactly one +subwindow it is better (faster and the result is more precise as Fit adds some +margin to account for fuzziness of its calculations) to call + +\begin{verbatim} + window->SetClientSize(child->GetSize()); +\end{verbatim} + +instead of calling Fit. \membersection{wxWindow::FitInside}\label{wxwindowfitinside}