]> git.saurik.com Git - wxWidgets.git/commitdiff
Don't use margins for wxGrid in place text editor controls.
authorVadim Zeitlin <vadim@wxwidgets.org>
Sun, 20 Jan 2013 02:09:05 +0000 (02:09 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sun, 20 Jan 2013 02:09:05 +0000 (02:09 +0000)
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

src/generic/grideditors.cpp

index 939552b1803d0e2d4647b9ed28e67ce4122eb3e8..cadc963e9e3fbc053d3354d065e286475ca78233 100644 (file)
@@ -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();