A set of mutually exclusive check boxes

edited September 2013 in FastReport 4.0
Hi.

I've got a FAST report with a series of YES/NO checkboxes, and I'm trying to write a method that will uncheck the second the corresponding checkbox if the other one is clicked.

I know that something like
procedure ChkboxScannedVerifiedOnPreviewClick(Sender: TfrxView; Button: TMouseButton; Shift: Integer; var Modified: Boolean);
begin
    TfrxCheckboxView(Sender).Checked := not TfrxCheckboxView(Sender).Checked;                                                                                                    
  Modified := True;  
end;

can be used to check or uncheck a single checkbox.

But the method I've written doesn't work. I've written 8 methods. One for each checkbox.
procedure ChkboxScannedVerifiedOnPreviewClick(Sender: TfrxView; Button: TMouseButton; Shift: Integer; var Modified: Boolean);
begin
    CheckBox24.Checked := not CheckBox24.Checked;
    if CheckBox25.Checked then
      CheckBox25.Checked := False;
    end;                      
  Modified := True;  
end;

Any idea what I'm doing wrong here?

Comments

  • edited 3:12AM
    Am I unable to edit anything but sender for this event?

    I can change properties of other objects for an event like OnAfterData, but I'm unable to make any changes for anything except Sender for OnPreviewClick.

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.