Delete key doesn't work

In a program I am working on I have a form with a TRichEdit component. When I select text and press the delete key the text is deleted but if the cursor is in the middle of the text and nothing is selected pressing the delete key dose not delete the next character to the right of the cursor as is usual but does nothing. Is there a property I am overlooking that I need to set or is the problem something else?
LVL 1
TheophilusAsked:
Who is Participating?
 
pin_plunderConnect With a Mentor Commented:
hey! i got the same problem using my rich edit. I'm sure you must have created a menu with the 'del' shortcut.

I was making a little word processor a year ago and used the 'del' shortcut for the delete command in the Edit menu and I went crazy till I realised what was happening.

The code I was using was for example:

procedure TMainForm.Delete(Sender: TObject);
begin
 reEdit.SelText := '';
end;

Easiest solution: change the shortcut to eg. shift del.

Cheers.

Pablo.
0
 
intheCommented:
hi,
if you open the project in delphi and put a new richedit does it also have this problem?
for me i just drop a richedit on a form and when i press run i can place the cursor anywhere and delete the char to the right as normal without changing any properties.
0
 
intheCommented:
do you have any onkeydown or onkeypress events that could be blocking the key stroke ?
0
 
TheophilusAuthor Commented:
I had an Edit menue with the Delete key as a shortcut to the Delete menu item as you said. Removing the shortcut key fixed the problem.

Thank you.

Theo.
0
 
pin_plunderCommented:
I'm happy to know my comment helped you.

Cheers!

Pablo.
0
All Courses

From novice to tech pro — start learning today.