title: wxSizers not arranging correctly in wxWidgets
body: <p>I have two <code>wxTextCtrl</code>s and two <code>wxButton</code>s inside a panel. I want to arrange them using sizers. I want to put the <code>wxTextCtrl</code>s to horizontal and the <code>wxButton</code>s to vertical. It seems not to work, here's my code:</p>
  
  <pre><code>    wxPanel* panel = new wxPanel(this);
      wxPanel* panel2 = new wxPanel(this);
      wxStaticText* u = new wxStaticText(panel, wxID_ANY, "Username");
      uid = new wxTextCtrl(panel, wxID_ANY);
      wxStaticText* p = new wxStaticText(panel, wxID_ANY, "Password");
      pass = new wxTextCtrl(panel, wxID_ANY, "", wxDefaultPosition, wxDefaultSize, wxTE_PASSWORD);
      wxButton* r = new wxButton(panel, 1, "Register");
      wxStaticLine* line = new wxStaticLine(panel2, wxID_ANY, wxDefaultPosition, wxSize(0,15));
      wxButton* l = new wxButton(panel, 2, "Login");
      //wxDefaultSize, wxTE_MULTILINE | wxHSCROLL | wxTE_READONLY);
      wxBoxSizer* panelSizer1 = new wxBoxSizer(wxHORIZONTAL);
  
      panelSizer1-&gt;Add(u, wxSizerFlags().Top());
      panelSizer1-&gt;Add(uid, wxSizerFlags().Top());
      panelSizer1-&gt;Add(p, wxSizerFlags().Top());
      panelSizer1-&gt;Add(pass, wxSizerFlags().Top());
      panel-&gt;SetSizer(panelSizer1);
      wxBoxSizer* panelSizer = new wxBoxSizer(wxVERTICAL);
      panelSizer-&gt;Add(l, wxSizerFlags().Center());
      panelSizer-&gt;Add(line, wxSizerFlags().Center());
      panelSizer-&gt;Add(r, wxSizerFlags().Center());
      panel-&gt;SetSizer(panelSizer);
  </code></pre>
  
  <p>What should I do?</p>