More OS/2 updates reflecting changes in 24 Branch

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@20248 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
David Webster
2003-04-17 15:47:35 +00:00
parent 9dff851556
commit 6e348b12dc
11 changed files with 92 additions and 29 deletions

View File

@@ -121,6 +121,7 @@ wxSize wxStaticText::DoGetBestSize() const
int nHeightLineDefault = 0;
int nHeightLine = 0;
wxString sCurLine;
bool bLastWasAmpersand = FALSE;
for (const wxChar *pc = sText; ; pc++)
{
@@ -161,6 +162,29 @@ wxSize wxStaticText::DoGetBestSize() const
}
else
{
//
// We shouldn't take into account the '&' which just introduces the
// mnemonic characters and so are not shown on the screen -- except
// when it is preceded by another '&' in which case it stands for a
// literal ampersand
//
if (*pc == _T('&'))
{
if (!bLastWasAmpersand)
{
bLastWasAmpersand = TRUE;
//
// Skip the statement adding pc to curLine below
//
continue;
}
//
// It is a literal ampersand
//
bLastWasAmpersand = FALSE;
}
sCurLine += *pc;
}
}