Τεκμηρίωση HotXLS

AfterGroup γεγονός

Occurs after the group title specified by Index is exported

Περιγραφή

You can use this event to apply additional formatting to the group title area

Σύνταξη

TAfterGroup = procedure (Sender: TObject; GroupIndex: Integer; GroupRow: IXLSRange; GroupCell: IXLSRange) of object;
Sender TObject. Καθορίζει the TDataToXLS component that triggered the event
GroupIndex Integer. One-based index of the group
GroupRow IXLSRange. Αντιπροσωπεύει a range which contains the whole group title area
GroupCell IXLSRange. Αντιπροσωπεύει a cell which contains the group value

Παράδειγμα

This example applies additional formatting for the group title area

procedure TForm1.DataToXLS1AfterGroup(Sender: TObject;
      GroupIndex: Integer; GroupRow: IXLSRange; GroupCell: IXLSRange);
begin
  GroupRow.Merge;
  With GroupRow do begin
     case GroupIndex of
        1:   Font.Size := 16;
        2:   Font.Size := 14;
        3:   Font.Size := 12;
        else Font.Size := 10;
     end;
  end;
end;