From 924856e586649e97df300261af41df81f2b455ed Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Fri, 13 Jun 2008 07:10:40 +0000 Subject: [PATCH] Use new API git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@54183 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- samples/menu/menu.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/samples/menu/menu.cpp b/samples/menu/menu.cpp index be55ff793c..f11de6d3a3 100644 --- a/samples/menu/menu.cpp +++ b/samples/menu/menu.cpp @@ -855,8 +855,9 @@ void MyFrame::OnGetLabelMenuItem(wxCommandEvent& WXUNUSED(event)) if ( item ) { + wxString label(item->GetItemLabelText()); wxLogMessage(_T("The label of the last menu item is '%s'"), - item->GetLabel().c_str()); + label.c_str()); } } @@ -871,14 +872,14 @@ void MyFrame::OnSetLabelMenuItem(wxCommandEvent& WXUNUSED(event)) ( _T("Enter new label: "), _T("Change last menu item text"), - item->GetLabel(), + item->GetItemLabelText(), this ); label.Replace( _T("\\t"), _T("\t") ); if ( !label.empty() ) { - item->SetText(label); + item->SetItemLabel(label); } } }