]> git.saurik.com Git - wxWidgets.git/blobdiff - docs/latex/wx/tsizer.tex
fix a typo
[wxWidgets.git] / docs / latex / wx / tsizer.tex
index 1ebd9dbbfb37e7c062da722f1665237a8c964af0..5218b51ef85357be3b56fbeecf83abcacc237d94 100644 (file)
@@ -215,7 +215,7 @@ wxALIGN\_BOTTOM, wxALIGN\_CENTER\_HORIZONTAL and wxALIGN\_CENTER\_VERTICAL do wh
 wxALIGN\_CENTRE (same as wxALIGN\_CENTER) is defined as (wxALIGN\_CENTER\_HORIZONTAL |
 wxALIGN\_CENTER\_VERTICAL).  Default alignment is wxALIGN\_LEFT | wxALIGN\_TOP.
 
-As mentioned above, any window belonging to a sizer may have border, and it can be specified
+As mentioned above, any window belonging to a sizer may have border, and it can be specified
 which of the four sides may have this border, using the wxTOP, wxLEFT, wxRIGHT and wxBOTTOM
 constants or wxALL for all directions (and you may also use wxNORTH, wxWEST etc instead). These
 flags can be used in combination with the alignment flags above as the second parameter of the
@@ -259,9 +259,9 @@ MyDialog::MyDialog(wxFrame *parent, wxWindowID id, const wxString &title )
      0,                // make vertically unstretchable
      wxALIGN_CENTER ); // no border and centre horizontally
 
-  SetSizer( topsizer );      // use the sizer for layout
-
-  topsizer->SetSizeHints( this );   // set size hints to honour minimum size
+  SetSizerAndFit(topsizer); // use the sizer for layout and size window
+                            // accordingly and prevent it from being resized
+                            // to smaller size
 }
 \end{verbatim}
 
@@ -302,9 +302,7 @@ MyDialog::MyDialog(wxFrame *parent, wxWindowID id, const wxString &title )
      button_sizer,
      wxSizerFlags(0).Center() ); 
 
-  SetSizer( topsizer );      // use the sizer for layout
-
-  topsizer->SetSizeHints( this );   // set size hints to honour minimum size
+  SetSizerAndFit(topsizer); // use the sizer for layout and set size and hints
 }
 \end{verbatim}