]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/popup/popup.cpp
Test header and renderer aligment separately, II
[wxWidgets.git] / samples / popup / popup.cpp
index 6ea7c912db9c41061eb51e8d30c1cb057e2aaa03..47b94bb0e037d7eb255565db4244fac9280e4601 100644 (file)
@@ -124,8 +124,8 @@ SimpleTransientPopup::SimpleTransientPopup( wxWindow *parent )
                      NULL, this);
 
     wxStaticText *text = new wxStaticText( m_panel, wxID_ANY,
                      NULL, this);
 
     wxStaticText *text = new wxStaticText( m_panel, wxID_ANY,
-                          wxT("wx.PopupTransientWindow is a\n")
-                          wxT("wx.PopupWindow which disappears\n")
+                          wxT("wxPopupTransientWindow is a\n")
+                          wxT("wxPopupWindow which disappears\n")
                           wxT("automatically when the user\n")
                           wxT("clicks the mouse outside it or if it\n")
                           wxT("(or its first child) loses focus in \n")
                           wxT("automatically when the user\n")
                           wxT("clicks the mouse outside it or if it\n")
                           wxT("(or its first child) loses focus in \n")
@@ -142,7 +142,6 @@ SimpleTransientPopup::SimpleTransientPopup( wxWindow *parent )
     topSizer->Add( m_spinCtrl, 0, wxALL, 5 );
     topSizer->Add( m_mouseText, 0, wxCENTRE|wxALL, 5 );
 
     topSizer->Add( m_spinCtrl, 0, wxALL, 5 );
     topSizer->Add( m_mouseText, 0, wxCENTRE|wxALL, 5 );
 
-    m_panel->SetAutoLayout( true );
     m_panel->SetSizer( topSizer );
     topSizer->Fit(m_panel);
     topSizer->Fit(this);
     m_panel->SetSizer( topSizer );
     topSizer->Fit(m_panel);
     topSizer->Fit(this);
@@ -318,7 +317,7 @@ BEGIN_EVENT_TABLE(MyFrame, wxFrame)
 END_EVENT_TABLE()
 
 MyFrame::MyFrame(const wxString& title)
 END_EVENT_TABLE()
 
 MyFrame::MyFrame(const wxString& title)
-       : wxFrame(NULL, wxID_ANY, title)
+: wxFrame(NULL, wxID_ANY, title, wxDefaultPosition, wxSize(500,300))
 {
     m_simplePopup = m_scrolledPopup = NULL;
 
 {
     m_simplePopup = m_scrolledPopup = NULL;
 
@@ -365,7 +364,6 @@ MyFrame::MyFrame(const wxString& title)
     topSizer->Add( button2, 0, wxALL, 5 );
     topSizer->Add( m_logWin, 1, wxEXPAND|wxALL, 5 );
 
     topSizer->Add( button2, 0, wxALL, 5 );
     topSizer->Add( m_logWin, 1, wxEXPAND|wxALL, 5 );
 
-    panel->SetAutoLayout( true );
     panel->SetSizer( topSizer );
 
 }
     panel->SetSizer( topSizer );
 
 }
@@ -452,9 +450,7 @@ MyDialog::MyDialog(const wxString& title)
     topSizer->AddSpacer(40);
     topSizer->Add( okButton, 0, wxALL, 5 );
 
     topSizer->AddSpacer(40);
     topSizer->Add( okButton, 0, wxALL, 5 );
 
-    panel->SetAutoLayout( true );
-    panel->SetSizer( topSizer );
-    topSizer->Fit(this);
+    panel->SetSizerAndFit( topSizer );
 }
 
 void MyDialog::OnStartSimplePopup(wxCommandEvent& event)
 }
 
 void MyDialog::OnStartSimplePopup(wxCommandEvent& event)