+void wxGridCellTextEditor::SetSize(const wxRect& rectOrig)
+{
+ wxRect rect(rectOrig);
+
+ // Make the edit control large enough to allow for internal
+ // margins
+ //
+ // TODO: remove this if the text ctrl sizing is improved esp. for
+ // unix
+ //
+#if defined(__WXGTK__)
+ rect.Inflate(rect.x ? 1 : 0, rect.y ? 1 : 0);
+#else // !GTK
+ int extra = row && col ? 2 : 1;
+#if defined(__WXMOTIF__)
+ extra *= 2;
+#endif
+ rect.SetLeft( wxMax(0, rect.x - extra) );
+ rect.SetTop( wxMax(0, rect.y - extra) );
+ rect.SetRight( rect.GetRight() + 2*extra );
+ rect.SetBottom( rect.GetBottom() + 2*extra );
+#endif // GTK/!GTK
+
+ wxGridCellEditor::SetSize(rect);
+}
+