Possible fix for #2549

This should fix #2549 - EditLabel on CustomTreeCtrl doesn't automatically select the entire text
This commit is contained in:
Andrea Gavana
2024-09-05 14:03:59 +02:00
committed by GitHub
parent a87b02874e
commit 0806188d68

View File

@@ -1428,6 +1428,9 @@ class TreeTextCtrl(ExpandoTextCtrl):
bs = self.GetBestSize()
self.SetSize((-1, bs.height))
if self._startValue:
self.SelectAll()
self.Bind(wx.EVT_CHAR, self.OnChar)
self.Bind(wx.EVT_KEY_UP, self.OnKeyUp)
self.Bind(wx.EVT_KILL_FOCUS, self.OnKillFocus)