Browse Source

* Added BringToFont/SendToBack

git-svn-id: trunk@38802 -
michael 7 years ago
parent
commit
fa928fda1c
1 changed files with 23 additions and 0 deletions
  1. 23 0
      packages/fcl-report/src/fpreport.pp

+ 23 - 0
packages/fcl-report/src/fpreport.pp

@@ -970,6 +970,8 @@ type
     Procedure   Validate(aErrors : TStrings); override;
     procedure   Assign(Source: TPersistent); override;
     procedure FixupReference(PN, PV: String; C: TFPReportElement); override;
+    Procedure SendToBack(El : TFPReportElement);
+    Procedure BringToFront(El : TFPReportElement);
     Class Function ReportBandType : TFPReportBandType; virtual;
     procedure   WriteElement(AWriter: TFPReportStreamer; AOriginal: TFPReportElement = nil); override;
     procedure   ReadElement(AReader: TFPReportStreamer); override;
@@ -9079,6 +9081,27 @@ begin
     inherited FixupReference(PN, PV, C);
 end;
 
+procedure TFPReportCustomBand.SendToBack(El: TFPReportElement);
+
+Var
+  I : integer;
+
+begin
+  I:=FChildren.IndexOf(El);
+  If I>0 then
+    FChildren.Move(I,0);
+end;
+
+procedure TFPReportCustomBand.BringToFront(El: TFPReportElement);
+Var
+  I : integer;
+
+begin
+  I:=FChildren.IndexOf(El);
+  If (I>=0) and (I<FChildren.Count-1) then
+    FChildren.Move(I,FChildren.Count-1);
+end;
+
 class function TFPReportCustomBand.ReportBandType: TFPReportBandType;
 begin
   Result:=btUnknown;