You've already forked lazarus-ccr
jvcllaz: Fix stack overflow in JvTimeFrameWork demo due to TJvTFDaysPrinter.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@7099 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -1123,7 +1123,7 @@ object MainForm: TMainForm
|
||||
LineSpacing = 2
|
||||
ShowStartEnd = False
|
||||
left = 304
|
||||
top = 224
|
||||
top = 200
|
||||
end
|
||||
object dbUTF: TSQLite3Connection
|
||||
Connected = False
|
||||
@ -1497,4 +1497,56 @@ object MainForm: TMainForm
|
||||
36348834EDAD6AFF03880DBFF8
|
||||
}
|
||||
end
|
||||
object JvTFDaysPrinter1: TJvTFDaysPrinter
|
||||
ScheduleManager = utfScheduleManager1
|
||||
PageLayout.FooterHeight = 0
|
||||
PageLayout.HeaderHeight = 0
|
||||
PageLayout.MarginLeft = 25
|
||||
PageLayout.MarginTop = 17
|
||||
PageLayout.MarginRight = 25
|
||||
PageLayout.MarginBottom = 63
|
||||
PageLayout.ColsPerPage = 0
|
||||
PageLayout.RowsPerPage = 0
|
||||
PageLayout.AlwaysShowColHdr = False
|
||||
PageLayout.AlwaysShowRowHdr = False
|
||||
OnPrintProgress = JvTFDaysPrinter1PrintProgress
|
||||
OnAssembleProgress = JvTFDaysPrinter1AssembleProgress
|
||||
Title = 'SIMPLDaysPrinter Demo'
|
||||
ApptAttr.Color = clLime
|
||||
ApptAttr.ParentFont = False
|
||||
ApptBuffer = 0
|
||||
ColHdrHeight = 0
|
||||
Color = clBlack
|
||||
Cols = <>
|
||||
ColTitleStyle = ctsSingleClip
|
||||
DateFormat = 'ddddd'
|
||||
FancyRowHdrAttr.Hr2400 = False
|
||||
FancyRowHdrAttr.MajorFont.Height = -19
|
||||
FormattedDesc = False
|
||||
Granularity = 1
|
||||
GridLineColor = clBlack
|
||||
GroupHdrAttr.Font.Color = clWindowText
|
||||
GroupHdrAttr.ParentFont = False
|
||||
GroupHdrAttr.FrameColor = clBlack
|
||||
Grouping = grNone
|
||||
HdrAttr.Font.Color = clWindowText
|
||||
HdrAttr.ParentFont = False
|
||||
HdrAttr.FrameColor = clBlack
|
||||
MinColWidth = 5
|
||||
MinRowHeight = 1
|
||||
PrimeTime.StartTime = 0.333333333333333
|
||||
PrimeTime.EndTime = 0.708333333333333
|
||||
PrimeTime.Color = clYellow
|
||||
RowHdrType = rhGrid
|
||||
RowHdrWidth = 0
|
||||
RowHeight = 0
|
||||
ShowPics = False
|
||||
ShowText = False
|
||||
TimeFormat = 't'
|
||||
OnApptProgress = JvTFDaysPrinter1ApptProgress
|
||||
GridStartTime = 0
|
||||
GridEndTime = 0
|
||||
left = 304
|
||||
top = 259
|
||||
end
|
||||
end
|
||||
|
@ -43,6 +43,7 @@ type
|
||||
|
||||
TMainForm = class(TForm)
|
||||
ImageList: TImageList;
|
||||
JvTFDaysPrinter1: TJvTFDaysPrinter;
|
||||
Label1: TLabel;
|
||||
Label2: TLabel;
|
||||
Panel2: TPanel;
|
||||
@ -576,26 +577,24 @@ end;
|
||||
|
||||
procedure TMainForm.PrintButtonClick(Sender: TObject);
|
||||
begin
|
||||
(******************** wp: deactivated due to stack overflow ************
|
||||
With JvTFDaysPrinter1 do
|
||||
Begin
|
||||
// "Copy" the display properties from the JvTFDays control
|
||||
SetProperties(JvTFDays1);
|
||||
// Set gridline color to black for sharp display on printed page
|
||||
GridLineColor := clBlack;
|
||||
// print 48 rows on each page
|
||||
PageLayout.RowsPerPage := 48;
|
||||
// fit all the columns onto one page wide
|
||||
PageLayout.ColsPerPage := 0;
|
||||
// "Copy" the schedules from the JvTFDays control
|
||||
Cols.Assign(JvTFDays1.Cols);
|
||||
PrintProgress.Show;
|
||||
Application.ProcessMessages;
|
||||
// print the document
|
||||
PrintDirect;
|
||||
PrintProgress.Close;
|
||||
End;
|
||||
************************)
|
||||
with JvTFDaysPrinter1 do
|
||||
begin
|
||||
// "Copy" the display properties from the JvTFDays control
|
||||
SetProperties(JvTFDays1);
|
||||
// Set gridline color to black for sharp display on printed page
|
||||
GridLineColor := clBlack;
|
||||
// print 48 rows on each page
|
||||
PageLayout.RowsPerPage := 48;
|
||||
// fit all the columns onto one page wide
|
||||
PageLayout.ColsPerPage := 0;
|
||||
// "Copy" the schedules from the JvTFDays control
|
||||
Cols.Assign(JvTFDays1.Cols);
|
||||
PrintProgress.Show;
|
||||
Application.ProcessMessages;
|
||||
// print the document
|
||||
PrintDirect;
|
||||
PrintProgress.Close;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TMainForm.JvTFDaysPrinter1ApptProgress(Sender: TObject;
|
||||
|
Reference in New Issue
Block a user