Search Results for

    Show / Hide Table of Contents

    Interaction with controls

    By using a script, complex logic can be incorporated into a dialogue's operation. Let's illustrate this with a simple example. Modify the form like this:

    Double-click on the “CheckBox” object to create an “OnClick” event handler and enter the following script:

    PascalScript:

    procedure CheckBox1OnClick(Sender: TfrxComponent);
    begin
      Button1.Enabled := not CheckBox1.Checked;
    end;
    

    C++ Script:

    void CheckBox1OnClick(TfrxComponent Sender)
    {
      Button1.Enabled = !CheckBox1.Checked;
    }
    

    This code is the same as is used in Delphi. On running the report the button responds to the state of the check box.

    Back to top © 1998-2022 Copyright Fast Reports Inc.