diff --git a/src/motif/textctrl.cpp b/src/motif/textctrl.cpp index 6512988d93..1f616b7201 100644 --- a/src/motif/textctrl.cpp +++ b/src/motif/textctrl.cpp @@ -655,7 +655,8 @@ void wxTextCtrl::ChangeBackgroundColour() if (vsb) DoChangeBackgroundColour((WXWidget) vsb, backgroundColour, TRUE); - DoChangeBackgroundColour((WXWidget) parent, m_backgroundColour, TRUE); + // MBN: why change parent background? + // DoChangeBackgroundColour((WXWidget) parent, m_backgroundColour, TRUE); } } @@ -728,12 +729,15 @@ wxSize wxDoGetSingleTextCtrlBestSize( Widget textWidget, XmNhighlightThickness, &highlight, XmNshadowThickness, &shadow, NULL ); + if( !value ) value = "|"; int x, y; window->GetTextExtent( value, &x, &y ); + if( x < 100 ) x = 100; + return wxSize( x + 2 * xmargin + 2 * highlight + 2 * shadow, // MBN: +2 necessary: Lesstif bug or mine? y + 2 * ymargin + 2 * highlight + 2 * shadow + 2 );