Page 1 of 1

Can I disable double click on Header / Footer

Posted: Tue Feb 18, 2014 6:36 pm
by starhu
Hello,

If I double click on Header / Footer, ScalerichView will show the editor part of it.
Even if I set SRichViewEdit1.RVHeader.ReadOnly := True;

Can I disable double click on header and footer?

Thank you

Posted: Wed Feb 19, 2014 8:53 am
by Sergey Tkachenko
Yes, there are options to hide headers and footers, but no options to prevent activation of editing (however, you cannot change them if they are readonly).

Currently, the only solution is moving the caret back to the main editor in OnChangeActiveEditor event:

Code: Select all

procedure TForm3.SRichViewEdit1ChangeActiveEditor(Sender: TSRichViewEdit;
  ActiveEditor: TRichViewEdit);
begin
  if (ActiveEditor=Sender.RVHeader) or (ActiveEditor=Sender.RVFooter) then
    Sender.StartEditing(srvrveMain)
end;

Posted: Wed Feb 19, 2014 2:33 pm
by starhu
I tried it, but it didn't get into the event if I double clicked on the Header.

I put a breakpoint and it never stopped there. :(
Might it be the reason that I use the multi tabbed demo?

Thank you

Posted: Wed Feb 19, 2014 3:23 pm
by Sergey Tkachenko
I think yes - you need to assign this event to new editors.
In the original ActionTestTabs demo, properties of a new editor are assigned in the procedure TForm3.AddEditor.
You can add there:

Code: Select all

  srve.OnChangeActiveEditor  := ActiveEditor.OnChangeActiveEditor ;

Posted: Wed Feb 19, 2014 5:34 pm
by starhu
Thank you, it works!