use GetLabelText() instead of wxStripMenuCodes() to avoid stripping the part of the string after TAB

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40331 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2006-07-25 18:47:39 +00:00
parent 54076686b9
commit 32cd189dfc
22 changed files with 32 additions and 35 deletions

View File

@@ -254,7 +254,7 @@ wxSize wxButton::DoGetBestSize() const
wxCoord wBtn,
hBtn;
dc.GetMultiLineTextExtent(wxStripMenuCodes(GetLabel()), &wBtn, &hBtn);
dc.GetMultiLineTextExtent(GetLabelText(), &wBtn, &hBtn);
// add a margin -- the button is wider than just its label
wBtn += 3*GetCharWidth();
@@ -850,8 +850,8 @@ bool wxButton::MSWOnDraw(WXDRAWITEMSTRUCT *wxdis)
COLORREF colFg = wxColourToRGB(GetForegroundColour());
DrawButtonText(hdc, &rectBtn,
(state & ODS_NOACCEL ? wxStripMenuCodes(GetLabel())
: GetLabel()),
state & ODS_NOACCEL ? GetLabelText()
: GetLabel(),
state & ODS_DISABLED ? GetSysColor(COLOR_GRAYTEXT)
: colFg);