• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 734
  • Last Modified:

REAL ReadOnly RichEdit control

I am looking for a REAL ReadOnly richedit control (ie one that does not have a caret or allow you to select text) I thought about using one of the RTFLabel components out there but none of them have scrollbars so thats not going to work so does anyone have some code that will accomplish this ?
0
ezpete
Asked:
ezpete
  • 2
  • 2
  • 2
  • +4
2 Solutions
 
kretzschmarCommented:
?? just disable your TRichEdit-Control
0
 
wimmeyvaertCommented:
Can't you just set the enabled property to False ?
0
 
wimmeyvaertCommented:
Oops, sorry Kretzschmar, I overlooked your comment.
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
mokuleCommented:
Yes disable it. But..
You must do it big enough so that all text will be visible and place it on a smaller scrollbox
0
 
pritaeasSoftware EngineerCommented:
I don't know of your contents, but you could consider using a webbrowser instead.
0
 
geobulCommented:
Hi,

You may also try the following:

procedure TForm1.RichEdit1Enter(Sender: TObject);
begin
  PostMessage(Handle, WM_NEXTDLGCTL, 0, 0);
end;

if you have more than one control on the form and don't want the RichEdit to be disabled.

Regards, Geo
0
 
mokuleCommented:
And If You have no other controls You can do

procedure TForm1.RichEdit1Enter(Sender: TObject);
begin
  ActiveControl := nil;
end;
0
 
geobulCommented:
Forgot to say that you have to set RichEdit.TabStop to false only. No other changes in the default properties values are necessary.
0
 
VoodoomanCommented:

I stop people highlighting text by setting the focus to another control on the onenter event.

I kill key presses by setting the key=#0

Voodooman
0
 
ezpeteAuthor Commented:
Thx for the replies and I did the disable control thing before I posted  but I need the ability to use the scrollbars so thats not an option. Will check out the other comments and see how they work.
0
 
ezpeteAuthor Commented:
Thx for the comments again I chose the methods from geobul and mokule equally because they both work as I need them to do and are the easiest to accomplish.

Thx Again,
Pete
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

  • 2
  • 2
  • 2
  • +4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now