Make find/replace and automation text fields unlimited length

On Windows text fields default to a maximum of 30,000 characters.
This commit is contained in:
Thomas Goyne 2014-04-16 08:09:52 -07:00
parent d07cba4875
commit 00a3547453
2 changed files with 3 additions and 0 deletions

View file

@ -180,6 +180,7 @@ namespace Automation4 {
wxControl *Create(wxWindow *parent) override {
cw = new wxTextCtrl(parent, -1, to_wx(text));
cw->SetMaxLength(0);
cw->SetValidator(StringBinder(&text));
cw->SetToolTip(to_wx(hint));
return cw;

View file

@ -63,11 +63,13 @@ DialogSearchReplace::DialogSearchReplace(agi::Context* c, bool replace)
auto find_sizer = new wxFlexGridSizer(2, 2, 5, 15);
find_edit = new wxComboBox(this, -1, "", wxDefaultPosition, wxSize(300, -1), recent_find, wxCB_DROPDOWN, StringBinder(&settings->find));
find_edit->SetMaxLength(0);
find_sizer->Add(new wxStaticText(this, -1, _("Find what:")), wxSizerFlags().Center().Left());
find_sizer->Add(find_edit);
if (has_replace) {
replace_edit = new wxComboBox(this, -1, "", wxDefaultPosition, wxSize(300, -1), lagi_MRU_wxAS("Replace"), wxCB_DROPDOWN, StringBinder(&settings->replace_with));
replace_edit->SetMaxLength(0);
find_sizer->Add(new wxStaticText(this, -1, _("Replace with:")), wxSizerFlags().Center().Left());
find_sizer->Add(replace_edit);
}