From 92e6f4ffa70f9688974715207b44e174d2b146e4 Mon Sep 17 00:00:00 2001 From: dsiders Date: Thu, 22 Feb 2024 19:20:12 +0000 Subject: [PATCH] Docs: LCL/comctrls. Updates EditorEditingDone and EditorKeyDown topics in TCustomTreeView for changes in 7716068e. --- docs/xml/lcl/comctrls.xml | 81 ++++++++++++++++++++++++++++++++++++--- 1 file changed, 75 insertions(+), 6 deletions(-) diff --git a/docs/xml/lcl/comctrls.xml b/docs/xml/lcl/comctrls.xml index 9eabcd3ca7..0983366bd5 100644 --- a/docs/xml/lcl/comctrls.xml +++ b/docs/xml/lcl/comctrls.xml @@ -33101,10 +33101,32 @@ Signals the OnAddition event handler (when assigned). -Implements the OnEditingDone event handler for the Editor in the control. +Implements the OnEditingDone event handler for a tree node editor on the +control. - - + +

+Performs actions when the editor has finished editing a tree node on the +control. It calls EndEditing to update state flags, and to signal assigned +OnEdited and OnEditingEnd events handlers when the Text for the tree node is +changed. It calls SetFocus to restore focus to the tree view control if the +editor was assigned and had focus on entry to the method. +

+

+EditorEditingDone is used as the OnEditingDone event handler for the internal +TEdit control created when the BeginEditing method is called. +

+
+ + + + + + + + +TWinControl.SetFocus +
Object for the event notification. @@ -33112,10 +33134,57 @@ Implements the OnEditingDone event handler for the Editor in the control. -Implements the OnKeyDown event handler for the Editor in the control. +Implements the OnKeyDown event handler for the editor on the tree view control. - - + +

+EditorKeyDown ensures that key down events and focus change are +handled for the tree node editor on the control. +

+

+Key and Shift contain the virtual key code and shift +modifier(s) for the key down event. Virtual key codes handled in the method +include: +

+
+
Return (VK_RETURN)
+
+Ends editing and accepts the changed valued in the Text for the tree node in +EditingItem. +
+
Escape (VK_ESCAPE)
+
+Ends editing but rejects any change to the text for the EditingItem. +
+
+

+Shift must be an empty set ([]) to handle these virtual key codes in the method. +

+

+EditorKeyDown calls EndEditing to update state flags, and to signal assigned +OnEdited and OnEditingEnd events handlers when the Text for the tree node is +changed. It calls SetFocus to restore focus to the tree view control if the +tree node editor was assigned and had focus on entry to the method. +

+

+The value in Key is set to 0 to if the virtual key code is handled in the +method. +

+

+EditorKeyDown is used as the OnKeyDown event handler for the internal TEdit +control created in the BeginEditing method. +

+
+ + + + + + + + +TWinControl.SetFocus +
Object for the event notification.