Solved

not displaying text in trichedit

Posted on 2000-04-21
5
180 Views
Last Modified: 2010-04-04
hi,
i am making my own terminal program and i am using a richedit component. when the userpresses a key, i don't want to display it in the rich edit box. in the onkeypress event i send it down the serial port. but i don't want it displayed on the screen as i said. but i don't want to disable the character visiblity completely because anything that comes down the serial line should show on the richedit box (i already did this). my only problem is to not show the characters that the user presses on his keyboard. how do i do this?
0
Comment
Question by:twilight_prince
5 Comments
 
LVL 2

Accepted Solution

by:
rene100 earned 50 total points
ID: 2737874
Hi

Add the follwing Line to the Code in the OnKeyPress-Event:

Key:=#0;


regards
rene

0
 
LVL 17

Expert Comment

by:inthe
ID: 2737893
listening..
0
 

Expert Comment

by:Zdhanko
ID: 2737918
In the onkeypress event supress key handling like this
procedure TForm1.RichEdit1KeyPress(Sender: TObject; var Key: Char);
begin
{Send Key to COM Port-> Here your code}
Key:=char(#0);
end;
 
0
 
LVL 3

Expert Comment

by:bryan7
ID: 2739465
you can also use a secondary richedit to enter the lines
0
 
LVL 17

Expert Comment

by:inthe
ID: 2739986
hi ,
actually you can simply do this by just set the richedit to readonly in the object inspector or on form create event.

richedit1.readonly := true;

cheers Barry
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

766 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question