From: Vadim Zeitlin Date: Sun, 20 Jan 2013 02:09:05 +0000 (+0000) Subject: Don't use margins for wxGrid in place text editor controls. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/f765ac69a047ed3c58a11dece33a0b31931b0fb7 Don't use margins for wxGrid in place text editor controls. The default non-zero (at least under MSW) margins don't look well inside wxGrid, don't waste space on them. See #14958. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73392 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/generic/grideditors.cpp b/src/generic/grideditors.cpp index 939552b180..cadc963e9e 100644 --- a/src/generic/grideditors.cpp +++ b/src/generic/grideditors.cpp @@ -399,9 +399,11 @@ void wxGridCellTextEditor::DoCreate(wxWindow* parent, // show it again for a different cell. style |= wxTE_PROCESS_ENTER | wxTE_PROCESS_TAB | wxNO_BORDER | wxTE_RICH2; - m_control = new wxTextCtrl(parent, id, wxEmptyString, - wxDefaultPosition, wxDefaultSize, - style); + wxTextCtrl* const text = new wxTextCtrl(parent, id, wxEmptyString, + wxDefaultPosition, wxDefaultSize, + style); + text->SetMargins(0, 0); + m_control = text; #ifdef __WXOSX__ wxWidgetImpl* impl = m_control->GetPeer();