Link to home
Start Free TrialLog in
Avatar of twilight_prince
twilight_prince

asked on

not displaying text in trichedit

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?
ASKER CERTIFIED SOLUTION
Avatar of rene100
rene100

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of inthe
inthe

listening..
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;
 
you can also use a secondary richedit to enter the lines
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