How to completely disable header/footer editing?

ScaleRichView support and discussion (TRichView add-on for WYSIWYG editing)
Post Reply
Tavo
Posts: 175
Joined: Sat Sep 24, 2005 9:25 pm
Location: Buenos Aires, Argentina
Contact:

How to completely disable header/footer editing?

Post by Tavo »

Hey there!!! Salute from Buenos Aires and sorry for my bad english...
I need to work with documents that have a header and a footer that are stored separately (in another TFieldBlob).
I need both documents (header and ffoter) are read-only so that users can not modify them.
I tried with ....

Code: Select all

   Self.SRV.RVHeader.ReadOnly := True ;
   Self.SRV.RVFooter.ReadOnly := True ;
It works, but anyway this causes two unwanted effects:

- It is visually indicated by the appearance of the editor.
- Editor header (readonly) takes focus

Is there a way to tell TSRichViewEdit only show the contents of the subdocuments and not allow to edit them?

Thanks in advance

..
Sergey Tkachenko
Site Admin
Posts: 17554
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

Process SRV.OnChangeActiveEditor:

Code: Select all

procedure TForm3.SRVChangeActiveEditor(Sender: TSRichViewEdit; 
  ActiveEditor: TRichViewEdit); 
begin 
  if (ActiveEditor=Sender.RVHeader) or (ActiveEditor=Sender.RVFooter) then 
    Sender.StartEditing(srvrveMain) 
end;
Tavo
Posts: 175
Joined: Sat Sep 24, 2005 9:25 pm
Location: Buenos Aires, Argentina
Contact:

Post by Tavo »

This was exactly what I needed
It works perfectly
Thank you, Sergey
Post Reply