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:
parent
461edab540
commit
c87fc2859d
@ -132,7 +132,18 @@ bool wxButton::Create(wxWindow *parent,
|
|||||||
{
|
{
|
||||||
wxString label(lbl);
|
wxString label(lbl);
|
||||||
if (label.empty() && wxIsStockID(id))
|
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) )
|
if ( !CreateControl(parent, id, pos, size, style, validator, name) )
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
Reference in New Issue
Block a user