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?
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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.
do you have any onkeydown or onkeypress events that could be blocking the key stroke ?
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);
 reEdit.SelText := '';

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



Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
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.

I'm happy to know my comment helped you.


It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.