FIX: wxTE_PROCESS_ENTER flag for wxTextCtrl

Change-Id: I23b43997f080ed173676c2582148b8db6e83b701
This commit is contained in:
chunmao.guo 2022-08-26 09:37:46 +08:00 committed by Lane.Wei
parent 966242b8dd
commit ed1870b3a5

View file

@ -55,7 +55,7 @@ void TextInput::Create(wxWindow * parent,
style &= ~wxRIGHT; style &= ~wxRIGHT;
state_handler.attach({&label_color, & text_color}); state_handler.attach({&label_color, & text_color});
state_handler.update_binds(); state_handler.update_binds();
text_ctrl = new wxTextCtrl(this, wxID_ANY, text, {4, 4}, wxDefaultSize, style | wxBORDER_NONE); text_ctrl = new wxTextCtrl(this, wxID_ANY, text, {4, 4}, wxDefaultSize, style | wxBORDER_NONE | wxTE_PROCESS_ENTER);
text_ctrl->SetFont(Label::Body_14); text_ctrl->SetFont(Label::Body_14);
text_ctrl->SetInitialSize(text_ctrl->GetBestSize()); text_ctrl->SetInitialSize(text_ctrl->GetBestSize());
text_ctrl->SetBackgroundColour(background_color.colorForStates(state_handler.states())); text_ctrl->SetBackgroundColour(background_color.colorForStates(state_handler.states()));