Toggle Header
Posted: Sun Apr 19, 2015 3:00 pm
				
				This is a small procedure called from a button click event on the form to toggle the header on or off. 
It seems to have stopped working and I have no idea why.
RVE is of type TSRichViewEdit
Not completely sure it it has to do with my updating to the Delphi XE7 version. From reading the forum posts on headers it seems that the commands to change displaying a header has changed but I can't seem to get it to display. Any ideas would be appreciated.
			It seems to have stopped working and I have no idea why.
RVE is of type TSRichViewEdit
Not completely sure it it has to do with my updating to the Delphi XE7 version. From reading the forum posts on headers it seems that the commands to change displaying a header has changed but I can't seem to get it to display. Any ideas would be appreciated.
Code: Select all
procedure TFormTextEditor.AddHeaderButtonClick(Sender: TObject);
begin
  if IsEmpty(RVE.RVHeader) then
  begin
    if FileExists(ExeDir+'MedicalTemplates\Header.rtf') then
    begin
      RVE.RVHeader.LoadRTF(ExeDir+'MedicalTemplates\Header.rtf');
      RVE.Format;
    end;
  end
  else
  begin
    RVE.RVHeader.Clear;
    RVE.Format;
  end;
  RVE.RichViewEdit.Modified := True;
end;