From 0806188d68797213052126467681497f4d5c8b3d Mon Sep 17 00:00:00 2001 From: Andrea Gavana Date: Thu, 5 Sep 2024 14:03:59 +0200 Subject: [PATCH] Possible fix for #2549 This should fix #2549 - EditLabel on CustomTreeCtrl doesn't automatically select the entire text --- wx/lib/agw/customtreectrl.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/wx/lib/agw/customtreectrl.py b/wx/lib/agw/customtreectrl.py index 0fbb15c46..40bd1fb41 100644 --- a/wx/lib/agw/customtreectrl.py +++ b/wx/lib/agw/customtreectrl.py @@ -1428,6 +1428,9 @@ def __init__(self, owner, item=None): 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)