How to completely disable header/footer editing?

Public forum for discussing TScaleRichView (shareware addon to TRichView providing WYSIWYG editing)
Post Reply
Tavo
Posts: 114
Joined: Sat Sep 24, 2005 9:25 pm
Location: Buenos Aires, Argentina
Contact:

How to completely disable header/footer editing?

Post by Tavo » Mon Jan 18, 2016 2:26 pm

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: 13584
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko » Mon Jan 18, 2016 4:59 pm

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: 114
Joined: Sat Sep 24, 2005 9:25 pm
Location: Buenos Aires, Argentina
Contact:

Post by Tavo » Mon Jan 18, 2016 5:05 pm

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

Post Reply