Solved

RXRichEdit problem

Posted on 2000-05-12
3
440 Views
Last Modified: 2008-03-10
I am using the RxRichEdit control. Everything works fine except that if the control is read only, the OLE object can still be activated or edited. What can be the problem and what callback I should change so that it can't be activated or edited or context menu produced on it?
0
Comment
Question by:skanade
  • 2
3 Comments
 
LVL 2

Accepted Solution

by:
rene100 earned 100 total points
ID: 2806720
Hi

Change the following lines:

procedure TRxCustomRichEdit.PopupVerbClick(Sender: TObject);
var
  ReObject: TReObject;
begin
  if (Assigned(FRichEditOle)) and (ReadOnly=false) then begin
    FillChar(ReObject, SizeOf(ReObject), 0);
    ReObject.cbStruct := SizeOf(ReObject);

(add the (ReadOnly=false))

hope this helps

regards
rene
0
 

Author Comment

by:skanade
ID: 2807139
Taking hint from your code, I was also able to remove the popup menu. But, the object can still be selected, resized and opened for editing with double-click. How to disable that in read only mode?

Thanks.
0
 
LVL 2

Expert Comment

by:rene100
ID: 2807509
i think open/edit can be prevented by add/change the following lines:

procedure TRxCustomRichEdit.WMRButtonUp(var Message: TWMLButtonUP);
begin
if (stObject in SelectionType) and (ReadOnly=True) then
    Message.Msg:=0;
inherited;
end;

procedure TRxCustomRichEdit.WMLButtonDblClk(var Message: TWMLButtonDblClk);
begin
if (stObject in SelectionType) and (ReadOnly=True) then
    Message.Msg:=0;
inherited;
end;

but it's still possible to resize&select the object....

rene
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

757 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now