Don't send EVT_TEXT_ENTER to controls without wxTE_PROCESS_ENTER

wxMSW always sent this event to multiline text controls, even when they
didn't have wxTE_PROCESS_ENTER style, contrary to what was documented.

Avoid sending this event unless wxTE_PROCESS_ENTER is used and add unit
tests checking that multiline text controls don't get it without this
style (but still do get it with it).
This commit is contained in:
Vadim Zeitlin
2019-09-08 18:50:02 +02:00
parent 4c075c2128
commit 84f29ce472
5 changed files with 84 additions and 5 deletions

View File

@@ -85,6 +85,11 @@ public:
// Create the control of the right type using the given parent and style.
virtual wxControl* Create(wxWindow* parent, int style) const = 0;
// Return another creator similar to this one, but creating multiline
// version of the control. If the returned pointer is non-null, it must be
// deleted by the caller.
virtual TextLikeControlCreator* CloneAsMultiLine() const { return NULL; }
// Give it a virtual dtor to avoid warnings even though this class is not
// supposed to be used polymorphically.
virtual ~TextLikeControlCreator() {}