This works around a bug with the plain text edit control under MSW which seems
to totally lose its caret when we hide it and show it again for another cell.
This is not a proper fix for the problem, of course, but at least it does
allow to edit wxGrid cells in the meanwhile.
Closes #11681.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64646
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
wxEvtHandler* evtHandler,
long style)
{
wxEvtHandler* evtHandler,
long style)
{
- style |= wxTE_PROCESS_ENTER | wxTE_PROCESS_TAB | wxNO_BORDER;
+ // Use of wxTE_RICH2 is a strange hack to work around the bug #11681: a
+ // plain text control seems to lose its caret somehow when we hide it and
+ // show it again for a different cell.
+ style |= wxTE_PROCESS_ENTER | wxTE_PROCESS_TAB | wxNO_BORDER | wxTE_RICH2;
m_control = new wxTextCtrl(parent, id, wxEmptyString,
wxDefaultPosition, wxDefaultSize,
m_control = new wxTextCtrl(parent, id, wxEmptyString,
wxDefaultPosition, wxDefaultSize,