## 27.6 Layout Management (cont.)

- In wxWindows, use objects of the `wxSizer` class or one of its derived classes (such as `wxBoxSizer`) to specify the layout of user interface elements.
- These buttons would be lined up horizontally:

  >     wxBoxSizer* button_sizer = new wxBoxSizer(wxHORIZONTAL);
  >     button_sizer->Add(hello_button);
  >     button_sizer->Add(goodbye_button);

- A second sizer places the text control on top of the button row.

  >     wxBoxSizer* frame_sizer = new wxBoxSizer(wxVERTICAL);
  >     frame_sizer->Add(text, 1, wxGROW);
  >     frame_sizer->Add(button_sizer, 0, wxALIGN_CENTER);

prev |top |next