]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/grid.cpp
An attempt to make the notebook sizer report its size
[wxWidgets.git] / src / generic / grid.cpp
index 3e38c3085c089951e875cc6dc6a3aedcce31984f..d1cd40d8956cb56fcafc4b6759f2ebe9bbe3ffd5 100644 (file)
@@ -575,7 +575,11 @@ void wxGridCellTextEditor::Create(wxWindow* parent,
 #endif
                               );
 
-    // TODO: use m_maxChars
+    // set max length allowed in the textctrl, if the parameter was set
+    if (m_maxChars != 0)
+    {
+        ((wxTextCtrl*)m_control)->SetMaxLength(m_maxChars);
+    }
 
     wxGridCellEditor::Create(parent, id, evtHandler);
 }