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:
parent
7a29f5dd2c
commit
0bdc9bedbe
@ -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());
|
||||
|
Loading…
Reference in New Issue
Block a user