Enable setting maximum length of the entered text in wxLongStringProperty editor
Editor used by wxLongStringProperty is wxTextCtrl-based and it should be possible to set the limit of the length of the entered text just like it's done for such editors in another properties like wxStringProperty.
This commit is contained in:
@@ -2266,6 +2266,9 @@ bool wxLongStringProperty::DisplayEditorDialog( wxPGProperty* prop, wxPropertyGr
|
||||
edStyle |= wxTE_READONLY;
|
||||
wxTextCtrl* ed = new wxTextCtrl(dlg,wxID_ANY,value,
|
||||
wxDefaultPosition,wxDefaultSize,edStyle);
|
||||
int maxLen = prop->GetMaxLength();
|
||||
if ( maxLen > 0 )
|
||||
ed->SetMaxLength(maxLen);
|
||||
|
||||
rowsizer->Add(ed, wxSizerFlags(1).Expand().Border(wxALL, spacing));
|
||||
topsizer->Add(rowsizer, wxSizerFlags(1).Expand());
|
||||
|
Reference in New Issue
Block a user