Use new API

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@54183 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
2008-06-13 07:10:40 +00:00
parent 3a020570cd
commit 924856e586

View File

@@ -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);
}
}
}