);
m_panel = new wxPanel(this, -1, wxDefaultPosition, wxDefaultSize,
- wxTAB_TRAVERSAL | wxCLIP_CHILDREN | wxNO_BORDER);
+ wxTAB_TRAVERSAL | wxCLIP_CHILDREN | wxNO_BORDER | wxNO_FULL_REPAINT_ON_RESIZE);
// Create remaining controls
m_btnExit = new wxButton( m_panel, wxID_OK, wxT("&Exit") );
m_btnExit->SetDefault();
- m_notebook = new MyNotebook(m_panel, ID_NOTEBOOK);
-
m_text = new wxTextCtrl(m_panel, -1, wxEmptyString,
wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE | wxTE_READONLY);
m_logTargetOld = wxLog::SetActiveTarget( new wxLogTextCtrl(m_text) );
- // Create the notebook's panels
- m_notebook->CreateInitialPages();
-
// Set sizers
m_sizerFrame = new wxBoxSizer(wxVERTICAL);
m_sizerFrame->Add(m_text, 0, wxEXPAND);
ReInitNotebook();
+ m_notebook->CreateInitialPages();
m_panel->SetSizer(m_sizerFrame);
m_notebook = new MyNotebook(m_panel, ID_NOTEBOOK,
wxDefaultPosition, wxDefaultSize,
- flags);
+ flags|wxCLIP_CHILDREN|wxNO_FULL_REPAINT_ON_RESIZE);
if ( m_chkShowImages->IsChecked() )
{
{
wxString str = notebook->GetPageText(n);
- wxNotebookPage *page = m_notebook->CreatePage(str);
+ wxWindow *page = m_notebook->CreatePage(str);
m_notebook->AddPage(page, str, FALSE, m_notebook->GetIconIndex() );
}
}
- m_sizerNotebook = new wxNotebookSizer(m_notebook);
+ m_sizerNotebook = new wxBookCtrlSizer(m_notebook);
m_sizerTop->Add(m_sizerNotebook, 1, wxEXPAND | wxALL, 4);
m_sizerTop->Layout();
}
EVT_IDLE(MyFrame::OnIdle)
END_EVENT_TABLE()
-void MyFrame::OnCheckOrRadioBox(wxCommandEvent& event)
+void MyFrame::OnCheckOrRadioBox(wxCommandEvent& WXUNUSED(event))
{
ReInitNotebook();
}
void MyFrame::OnButtonAddPage( wxCommandEvent& WXUNUSED(event) )
{
- static size_t s_pageAdded = 0;
+ static unsigned s_pageAdded = 0;
wxPanel *panel = new wxPanel( m_notebook, -1 );
- (void) new wxButton( panel, -1, wxT("Frist button"),
+ (void) new wxButton( panel, -1, wxT("First button"),
wxPoint(10, 10), wxSize(-1, -1) );
(void) new wxButton( panel, -1, wxT("Second button"),
wxPoint(50, 100), wxSize(-1, -1) );
void MyFrame::OnButtonInsertPage( wxCommandEvent& WXUNUSED(event) )
{
- static size_t s_pageIns = 0;
+ static unsigned s_pageIns = 0;
wxPanel *panel = m_notebook->CreateUserCreatedPage();