Keep existing height of edit widget, and move the activation to a call-after

This commit is contained in:
Robin Dunn
2018-05-30 16:46:25 -07:00
parent 2f5c143fa7
commit 6453684bc3

View File

@@ -611,14 +611,15 @@ class TextEditMixin:
y0 = self.GetItemRect(row)[1]
editor = self.editor
editor.SetSize(x0-scrolloffset,y0, x1,-1)
def _activate_editor(editor):
editor.SetSize(x0-scrolloffset,y0, x1,-1, wx.SIZE_USE_EXISTING)
editor.SetValue(self.GetItem(row, col).GetText())
editor.Show()
editor.Raise()
editor.SetSelection(-1,-1)
editor.SetFocus()
editor.SetValue(self.GetItem(row, col).GetText())
editor.Show()
editor.Raise()
editor.SetSelection(-1,-1)
editor.SetFocus()
wx.CallAfter(_activate_editor, self.editor)
self.curRow = row
self.curCol = col