Solved

RXRichEdit problem

Posted on 2000-05-12
3
441 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Delphi selector screen 2 69
Find and Replace Stream with 0s 8 56
TEMBEDDEDWB how can i change its user agent ? 8 45
tvirtualstringtree freeze when load too manny images 10 52
Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
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…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

914 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

12 Experts available now in Live!

Get 1:1 Help Now