Board index » delphi » delete shortcut prevents user from deleting text

delete shortcut prevents user from deleting text

Hi,

simple question: when I define delete as a shortcut
in an actionitem, I cannot use that key anymore in
my combobox editfields.

Via Dejanews I found a tip by Peter Below who suggested
the following approach for a RTF control to mimic the
delete process:

      if SelLength=0 then SelLength:=1;
      SelText:=EmptyStr;

My problem is now, how do I know that delete has been
pressed? Since I assigned that shortcut the usual events
do not fire. No keydown/up/press (keypreview=true), and
no application.onshortcut.

What can I do (except from removing the shortcut, everything
works fine then)?

Regards,
Werner Lehmann

 

Re:delete shortcut prevents user from deleting text


Quote
In article <371F52EA.475F2...@bwl.uni-kiel.de>, Werner Lehmann wrote:
> What can I do (except from removing the shortcut, everything
> works fine then)?

Do the delete in the actionitems OnExecute event, check ActiveControl
to see if you have a combobox.

Peter Below (TeamB)  100113.1...@compuserve.com)
No e-mail responses, please, unless explicitely requested!

Other Threads