X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1c9588456e717f8e8c83b1124504b16d2c400b86..80c765ac5a07e835c9c20371d1ed9151762bfe41:/samples/dataview/dataview.cpp diff --git a/samples/dataview/dataview.cpp b/samples/dataview/dataview.cpp index cf7f30e41c..692d94eb2d 100644 --- a/samples/dataview/dataview.cpp +++ b/samples/dataview/dataview.cpp @@ -435,7 +435,7 @@ MyFrame::MyFrame(wxFrame *frame, const wxString &title, int x, int y, int w, int mainSizer->Add( m_notebook, 1, wxGROW ); mainSizer->Add( m_log, 0, wxGROW ); - + SetSizerAndFit(mainSizer); } @@ -692,7 +692,7 @@ void MyFrame::OnAbout( wxCommandEvent& WXUNUSED(event) ) wxAboutDialogInfo info; info.SetName(_("DataView sample")); info.SetDescription(_("This sample demonstrates wxDataViewCtrl")); - info.SetCopyright(_T("(C) 2007-2009 Robert Roebling")); + info.SetCopyright(wxT("(C) 2007-2009 Robert Roebling")); info.AddDeveloper("Robert Roebling"); info.AddDeveloper("Francesco Montorsi"); @@ -819,7 +819,9 @@ void MyFrame::OnActivated( wxDataViewEvent &event ) wxLogMessage( "wxEVT_COMMAND_DATAVIEW_ITEM_ACTIVATED, Item: %s", title ); if (m_ctrl[0]->IsExpanded( event.GetItem() )) + { wxLogMessage( "Item: %s is expanded", title ); + } } void MyFrame::OnSelectionChanged( wxDataViewEvent &event ) @@ -850,12 +852,15 @@ void MyFrame::OnStartEditing( wxDataViewEvent &event ) if (artist == "Ludwig van Beethoven") { event.Veto(); - + if (!m_log) return; - - wxLogMessage( "wxEVT_COMMAND_DATAVIEW_ITEM_START_EDITING vetoed, Item: %s", artist ); + + wxLogMessage( "wxEVT_COMMAND_DATAVIEW_ITEM_START_EDITING vetoed. Artist: %s", artist ); } + else + wxLogMessage( "wxEVT_COMMAND_DATAVIEW_ITEM_START_EDITING not vetoed. Artist: %s", artist ); + } void MyFrame::OnEditingStarted( wxDataViewEvent &event )