Link to home
Start Free TrialLog in
Avatar of dr_gonzo
dr_gonzo

asked on

enable/disable popups in treeview in runtime

Hello!

I use Delphi 3.0.

I have a problem with treeviews.
I have linked a menu to the
treeview that has a option to
delete the selected node.
Thats menu command has [DEL]
as shortkey.
The problem is when the user is
editing the text in a node
and hits [DEL] to delete a letter.
My program now deletes the node
rather than one letter in the node's
text. How can I distinguish these separate
events?
I thought I could use OnEditing to disable
the popupmenu, but in what event can i reset
that event to show the popup?

thanks in advance,
Alexander
ASKER CERTIFIED SOLUTION
Avatar of Lischke
Lischke

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 dr_gonzo
dr_gonzo

ASKER

hmm forget the hole problem..
someone else had put a
hook for VK_DELETE as well
as having the shortcut.
I was only disabling the shortcut
popup-menu.

no problem at all.
But Mike's answer is correct if that would have been the problem so the score's all yours...

\Alexander
Alex, thank you then for the points. You don't need to donate points for an answer which has no use for you (unless perhaps I would have spent enormous time for answering it :-)).

Well, count on me for your next questions...

Ciao, Mike