Link to home
Start Free TrialLog in
Avatar of d32coder
d32coder

asked on

Treeview in-place editing problem

Delphi 6
Win XP Home


I have a Treeview and a series of Toolbuttons.

User clicks the "Add Toolbutton".  This creates a new TreeNode and sets it to Node.EditText;
The user enters random text and presses enter.  The label data is processed by the TV.OnEdited event.

So far so good.

If the user changes the node's label but does not hit ENTER, but instead clicks another node or another control, the TV.OnEdited event doesn't seem to get called.    I tried to set the OnChanging event to say

   If (Tv.IsEditing) then
     TV.Selected.EndEdit(FALSE);

but the data is still not saved.  The label itself is changed but I have to commit the changes to a record as well and that occurs in the OnEdited event.   Any ideas?

Don
ASKER CERTIFIED SOLUTION
Avatar of Tyrsis
Tyrsis

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of d32coder
d32coder

ASKER

Thanks for your help.    I'll review my OnEdited code a little better and see if I made an error in the way I stored the changes in my record.   I'll be back to this topic soon.

Don
Well, Placed a ShowMessage at the top of my OnEdited event and it does indeed fire.  My problem is in my data storage routine, not in the component.  Points awarded for the time you spent trying to reproduce the error.

Don