Change line visibility from OnPreviewClick event

Hi. I try to change line (TfrxLineView) visibility from OnPreviewClick event. I need to give to users possibility changing line visibility in prepaired report.

From demo (Handle previews click) I try use set Modified := True, but it does not work.

It's there any solution?
procedure Memo33OnPreviewClick(Sender: TfrxView; Button: TMouseButton; Shift: Integer; var Modified: Boolean);
begin
  Line3.Visible := not Line3.Visible;
  Modified := True;
end;

Thank you, Pavel

Comments

  • gpigpi
    edited 2:12PM
    You can change Sender only in the OnPreviewClick event
  • edited 2:12PM
    Yes, I try change visibile property from OnPreviewClick event. I define event on line object (TfrxLineView), but changing visible property is not reflected.
    procedure Line3OnPreviewClick(Sender: TfrxView; Button: TMouseButton; Shift: Integer; var Modified: Boolean);
    begin
      TfrxLineView(Sender).Visible := False;
      Modified := True;
    end;
    

    Do you try change visible property? (hide any object from report code in OnPreviewClick event)

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.