🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: alt.comp.borland-delphi
3 messages
3 total messages Started by 0BIT Mon, 03 Mar 2003 14:11
Delete not working
#1717
Author: 0BIT
Date: Mon, 03 Mar 2003 14:11
10 lines
1610 bytes
Hi I'm writing a program wich uses a TRichEdit, and in the menu i've created
a Delete item wich responds to the Del key.
And the TRichEdit doesn't respond anymore to the Del key.

How can I make the RichEdit1 respond to the Del key ??


Thanks in advance,

0BIT
Re: Delete not working
#1718
Author: Kelly Leahy
Date: Mon, 03 Mar 2003 16:09
19 lines
2218 bytes
You'll need to forward the DEL to the richedit if it is the active control.

Kelly

"0BIT" <someone@123.com> wrote in message
news:NoJ8a.153$Y%.120@amsnews02.chello.com...
> Hi I'm writing a program wich uses a TRichEdit, and in the menu i've
created
> a Delete item wich responds to the Del key.
> And the TRichEdit doesn't respond anymore to the Del key.
>
> How can I make the RichEdit1 respond to the Del key ??
>
>
> Thanks in advance,
>
> 0BIT
>
>
Re: Delete not working
#1719
Author: Paul Landregan
Date: Mon, 03 Mar 2003 18:37
27 lines
2236 bytes
you could use the OnKeyDown event along with the delete ASCII character #8.
would go something like this

procedure TfrmMain.RichEdit1KeyDown(Sender: TObject; var Key: Word;
  Shift: TShiftState);
begin
  if Key = #8 then
   RichEdit.Lines[whatever].Delete;
end;

Only a suggestion, I am only a novice however so there may be a better way.

"0BIT" <someone@123.com> wrote in message
news:NoJ8a.153$Y%.120@amsnews02.chello.com...
> Hi I'm writing a program wich uses a TRichEdit, and in the menu i've
created
> a Delete item wich responds to the Del key.
> And the TRichEdit doesn't respond anymore to the Del key.
>
> How can I make the RichEdit1 respond to the Del key ??
>
>
> Thanks in advance,
>
> 0BIT
>
>
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads