git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@36971
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
- dc.GetMultiLineTextExtent(GetLabel(), &wBtn, &hBtn);
+ dc.GetMultiLineTextExtent(wxStripMenuCodes(GetLabel()), &wBtn, &hBtn);
// add a margin -- the button is wider than just its label
wBtn += 3*GetCharWidth();
// add a margin -- the button is wider than just its label
wBtn += 3*GetCharWidth();
int wCheckbox, hCheckbox;
if ( !str.IsEmpty() )
{
int wCheckbox, hCheckbox;
if ( !str.IsEmpty() )
{
- GetTextExtent(str, &wCheckbox, &hCheckbox);
+ GetTextExtent(wxStripMenuCodes(str), &wCheckbox, &hCheckbox);
wCheckbox += s_checkSize + GetCharWidth();
if ( hCheckbox < s_checkSize )
wCheckbox += s_checkSize + GetCharWidth();
if ( hCheckbox < s_checkSize )
// and also wide enough for its label
int widthLabel;
// and also wide enough for its label
int widthLabel;
- GetTextExtent(GetLabel(), &widthLabel, NULL);
+ GetTextExtent(wxStripMenuCodes(GetLabel()), &widthLabel, NULL);
widthLabel += RADIO_SIZE; // FIXME this is bogus too
if ( widthLabel > width )
width = widthLabel;
widthLabel += RADIO_SIZE; // FIXME this is bogus too
if ( widthLabel > width )
width = widthLabel;
int wRadio, hRadio;
if ( !str.empty() )
{
int wRadio, hRadio;
if ( !str.empty() )
{
- GetTextExtent(str, &wRadio, &hRadio);
+ GetTextExtent(wxStripMenuCodes(str), &wRadio, &hRadio);
wRadio += s_radioSize + GetCharWidth();
if ( hRadio < s_radioSize )
wRadio += s_radioSize + GetCharWidth();
if ( hRadio < s_radioSize )
wxGetCharSize(GetHWND(), &cx, &cy, GetFont());
int wBox;
wxGetCharSize(GetHWND(), &cx, &cy, GetFont());
int wBox;
- GetTextExtent(wxGetWindowText(m_hWnd), &wBox, &cy);
+ GetTextExtent(wxStripMenuCodes(wxGetWindowText(m_hWnd)), &wBox, &cy);
wBox += 3*cx;
int hBox = EDIT_HEIGHT_FROM_CHAR_HEIGHT(cy);
wBox += 3*cx;
int hBox = EDIT_HEIGHT_FROM_CHAR_HEIGHT(cy);
{
wxString label = wxGetWindowText(GetHWND());
int wBtn;
{
wxString label = wxGetWindowText(GetHWND());
int wBtn;
- GetTextExtent(label, &wBtn, NULL);
+ GetTextExtent(wxStripMenuCodes(label), &wBtn, NULL);
int wChar, hChar;
wxGetCharSize(GetHWND(), &wChar, &hChar, GetFont());
int wChar, hChar;
wxGetCharSize(GetHWND(), &wChar, &hChar, GetFont());