Solved

RXRichEdit problem

Posted on 2000-05-12
3
452 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

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!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Intraweb submit form as a POST request 4 359
Delphi Dbf export problem to a Visual Foxpro application 6 234
Firemonkey DbLookupComboBox equivalent ? 2 68
MS Access from Delphi 31 81
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

726 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