mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-13 10:09:14 +02:00
parent
49785542af
commit
cc6780a8d2
@ -384,7 +384,7 @@ begin
|
|||||||
exit;
|
exit;
|
||||||
if Source is TMemoDragDrop then
|
if Source is TMemoDragDrop then
|
||||||
begin
|
begin
|
||||||
E:=TFPReportMemo.Create(ABand);
|
E:=TFPReportMemo.Create(ABand.Report);
|
||||||
C:=(Source as TMemoDragDrop).Content;
|
C:=(Source as TMemoDragDrop).Content;
|
||||||
TFPReportMemo(E).Text:=C;
|
TFPReportMemo(E).Text:=C;
|
||||||
R:=Default(TRect);
|
R:=Default(TRect);
|
||||||
|
@ -310,6 +310,7 @@ type
|
|||||||
procedure SetFileCaption(const AFileName: String);
|
procedure SetFileCaption(const AFileName: String);
|
||||||
procedure SetModified(AValue: Boolean);
|
procedure SetModified(AValue: Boolean);
|
||||||
procedure SetModifiedStatus;
|
procedure SetModifiedStatus;
|
||||||
|
procedure SetPageCaption(ASheet: TTabSheet);
|
||||||
Protected
|
Protected
|
||||||
procedure MRUMenuManager1RecentFile(Sender: TObject; const AFileName: String);
|
procedure MRUMenuManager1RecentFile(Sender: TObject; const AFileName: String);
|
||||||
procedure Notification(AComponent: TComponent; Operation: TOperation); override;
|
procedure Notification(AComponent: TComponent; Operation: TOperation); override;
|
||||||
@ -632,6 +633,24 @@ begin
|
|||||||
SBreport.Panels[2].text:=StateNames[CurrentDesigner.DesignerState];
|
SBreport.Panels[2].text:=StateNames[CurrentDesigner.DesignerState];
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Procedure TFPReportDesignerForm.SetPageCaption(ASheet : TTabSheet);
|
||||||
|
|
||||||
|
Var
|
||||||
|
TS : TPageTabSheet;
|
||||||
|
PageNo : Integer;
|
||||||
|
|
||||||
|
begin
|
||||||
|
if Not (Asheet is TPageTabSheet) then
|
||||||
|
exit;
|
||||||
|
TS:=ASheet as TPageTabSheet;
|
||||||
|
PageNo:=TS.TabIndex+1;
|
||||||
|
if (TS.Page.Name<>'') then
|
||||||
|
TS.Caption:=Format('Page %d (%s)',[PageNo,TS.Page.Name])
|
||||||
|
else
|
||||||
|
TS.Caption:=Format('Page %d',[PageNo]);
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
function TFPReportDesignerForm.AddPageDesign(aPageNo: Integer;
|
function TFPReportDesignerForm.AddPageDesign(aPageNo: Integer;
|
||||||
APage: TFPReportCustomPage): TTabSheet;
|
APage: TFPReportCustomPage): TTabSheet;
|
||||||
|
|
||||||
@ -644,8 +663,7 @@ begin
|
|||||||
TS:=TPageTabSheet.Create(Self);
|
TS:=TPageTabSheet.Create(Self);
|
||||||
TS.FPage:=APage;
|
TS.FPage:=APage;
|
||||||
TS.Parent:=PCReport;
|
TS.Parent:=PCReport;
|
||||||
TS.Caption:=Format('Page %d',[aPageNo]);
|
SetPageCaption(TS);
|
||||||
|
|
||||||
D:=TFPReportDesignerControl.Create(Self);
|
D:=TFPReportDesignerControl.Create(Self);
|
||||||
SB:=TScrollBox.Create(TS);
|
SB:=TScrollBox.Create(TS);
|
||||||
SB.Parent:=TS;
|
SB.Parent:=TS;
|
||||||
@ -799,6 +817,7 @@ Var
|
|||||||
begin
|
begin
|
||||||
P:=CreateNewPage;
|
P:=CreateNewPage;
|
||||||
FReport.AddPage(P);
|
FReport.AddPage(P);
|
||||||
|
P.Name:='Page'+IntToStr(FReport.PageCount);
|
||||||
FOI.RefreshReportTree;
|
FOI.RefreshReportTree;
|
||||||
PCReport.ActivePage:=AddPageDesign(FReport.PageCount,P);
|
PCReport.ActivePage:=AddPageDesign(FReport.PageCount,P);
|
||||||
Modified:=True;
|
Modified:=True;
|
||||||
@ -963,7 +982,8 @@ begin
|
|||||||
begin
|
begin
|
||||||
CurrentDesigner.UpdatePageParams;
|
CurrentDesigner.UpdatePageParams;
|
||||||
CurrentDesigner.Reset;
|
CurrentDesigner.Reset;
|
||||||
CurrentDesigner.Objects.SelectElement(CurrentDesigner.Page)
|
CurrentDesigner.Objects.SelectElement(CurrentDesigner.Page);
|
||||||
|
SetPageCaption(PCReport.ActivePage);
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
CurrentDesigner.Invalidate;
|
CurrentDesigner.Invalidate;
|
||||||
@ -1044,6 +1064,7 @@ begin
|
|||||||
begin
|
begin
|
||||||
p:=CreateNewPage;
|
p:=CreateNewPage;
|
||||||
FReport.AddPage(P);
|
FReport.AddPage(P);
|
||||||
|
P.Name:='Page'+IntToStr(FReport.PageCount);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user