Don't use mnemonics for OK, Cancel and Close under Windows, to follow

style guidelines


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31917 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart 2005-02-11 09:19:34 +00:00
parent 461edab540
commit c87fc2859d

View File

@ -132,7 +132,18 @@ bool wxButton::Create(wxWindow *parent,
{
wxString label(lbl);
if (label.empty() && wxIsStockID(id))
label = wxGetStockLabel(id);
{
// On Windows, some buttons aren't supposed to have
// mnemonics, so strip them out.
label = wxGetStockLabel(id
#if defined(__WXMSW__) || defined(__WXWINCE__)
, ( id != wxID_OK &&
id != wxID_CANCEL &&
id != wxID_CLOSE )
#endif
);
}
if ( !CreateControl(parent, id, pos, size, style, validator, name) )
return false;