Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

RXRichEdit problem

Posted on 2000-05-12
3
Medium Priority
?
465 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 300 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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
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…
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…
Suggested Courses

876 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