added checkbox for testing wxNB_MULTILINE

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@25580 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2004-02-07 20:20:29 +00:00
parent e69683678e
commit 9a6c9e31b0
2 changed files with 29 additions and 22 deletions

View File

@ -254,6 +254,8 @@ MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size,
m_chkShowImages = new wxCheckBox( m_panel, ID_CHK_SHOWIMAGES,
wxT("&Show images") );
m_chkMultiLine = new wxCheckBox( m_panel, ID_CHK_MULTILINE,
wxT("&Multiple lines") );
m_btnAddPage = new wxButton( m_panel, ID_BTN_ADD_PAGE, wxT("&Add page") );
@ -283,9 +285,9 @@ MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size,
m_sizerTop = new wxBoxSizer(wxHORIZONTAL);
wxBoxSizer *sizerLeft = new wxBoxSizer(wxVERTICAL);
{
sizerLeft->Add(m_radioOrient, 0, wxEXPAND);
sizerLeft->Add(m_chkShowImages, 0, wxEXPAND | wxTOP, 4);
sizerLeft->Add(m_chkMultiLine, 0, wxEXPAND | wxTOP, 4);
sizerLeft->Add(0, 0, 1); // Spacer
@ -298,7 +300,6 @@ MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size,
sizerLeft->Add(0, 0, 1); // Spacer
sizerLeft->Add(m_btnExit, 0, wxEXPAND);
}
m_sizerTop->Add(sizerLeft, 0, wxEXPAND | wxALL, 4);
@ -358,11 +359,14 @@ void MyFrame::ReInitNotebook()
break;
}
if ( m_chkMultiLine->IsChecked() )
flags |= wxNB_MULTILINE;
MyNotebook *notebook = m_notebook;
m_notebook = new MyNotebook(m_panel, ID_NOTEBOOK,
wxDefaultPosition, wxDefaultSize,
flags|wxCLIP_CHILDREN|wxNO_FULL_REPAINT_ON_RESIZE);
flags);
if ( m_chkShowImages->IsChecked() )
{
@ -406,6 +410,7 @@ void MyFrame::ReInitNotebook()
BEGIN_EVENT_TABLE(MyFrame, wxFrame)
EVT_RADIOBOX(ID_RADIO_ORIENT, MyFrame::OnCheckOrRadioBox)
EVT_CHECKBOX(ID_CHK_SHOWIMAGES, MyFrame::OnCheckOrRadioBox)
EVT_CHECKBOX(ID_CHK_MULTILINE, MyFrame::OnCheckOrRadioBox)
EVT_BUTTON(ID_BTN_ADD_PAGE, MyFrame::OnButtonAddPage)
EVT_BUTTON(ID_BTN_INSERT_PAGE, MyFrame::OnButtonInsertPage)

View File

@ -105,7 +105,8 @@ private:
wxPanel *m_panel; // Panel containing notebook and other controls
wxRadioBox *m_radioOrient;
wxCheckBox *m_chkShowImages;
wxCheckBox *m_chkShowImages,
*m_chkMultiLine;
wxButton *m_btnAddPage;
wxButton *m_btnInsertPage;
@ -141,6 +142,7 @@ enum ID_CONTROLS
{
ID_RADIO_ORIENT = wxID_HIGHEST,
ID_CHK_SHOWIMAGES,
ID_CHK_MULTILINE,
ID_BTN_ADD_PAGE,
ID_BTN_INSERT_PAGE,
ID_BTN_DELETE_CUR_PAGE,