diff --git a/docs/changes.txt b/docs/changes.txt index d91188d161..a69ab38840 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -70,6 +70,7 @@ wxMSW: - wxCheckListBox::Check() doesn't send CHECKLISTBOX_TOGGLE event any more - fixed bug with wxTR_EDIT_LABELS not workign with wxTR_MULTIPLE - fixes for compilation with OpenWatcom compiler +- fixed wxStaticText best size calculation (was wrong by '&' width) OLD CHANGES =========== diff --git a/src/msw/stattext.cpp b/src/msw/stattext.cpp index 6a2056e2af..14c62eca20 100644 --- a/src/msw/stattext.cpp +++ b/src/msw/stattext.cpp @@ -106,7 +106,10 @@ wxSize wxStaticText::DoGetBestSize() const } } else { - curLine += *pc; + // we shouldn't take into account the '&' which just introduce the + // mnemonic characters and so are not shown on the screen + if ( pc != _T('&') ) + curLine += *pc; } }