From 23a82fa5b8fabd7f3a647f11b1f61ba33d07d304 Mon Sep 17 00:00:00 2001 From: wp_xxyyzz Date: Fri, 9 Aug 2019 23:50:05 +0000 Subject: [PATCH] jvcllaz: Activate TDate and TTime property editors in JvTimeFramework components git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@7114 8e941d3f-bd1b-0410-a28a-d453659cc2b4 --- .../design/JvTimeFramework/jvtimeframeworkreg.pas | 6 ++++++ .../jvcllaz/examples/JvTimeFramework/tfmain.lfm | 11 ++++------- .../jvcllaz/examples/JvTimeFramework/tfshare.lfm | 9 +++++---- 3 files changed, 15 insertions(+), 11 deletions(-) diff --git a/components/jvcllaz/design/JvTimeFramework/jvtimeframeworkreg.pas b/components/jvcllaz/design/JvTimeFramework/jvtimeframeworkreg.pas index fcf002086..8e09ef278 100644 --- a/components/jvcllaz/design/JvTimeFramework/jvtimeframeworkreg.pas +++ b/components/jvcllaz/design/JvTimeFramework/jvtimeframeworkreg.pas @@ -31,6 +31,12 @@ begin // deleted, or moved at design time... BAD THINGS HAPPEN RegisterPropertyEditor(TypeInfo(TJvTFGlanceCells), TJvTFMonths, 'Cells', nil); + // The LCL TTime property editor is not installed by default. + RegisterPropertyEditor(TypeInfo(TTime), TJvTFDaysPrimeTime, '', TTimePropertyEditor); + RegisterPropertyEditor(TypeInfo(TDate), TJvTFDaysTemplate, '', TDatePropertyEditor); + RegisterPropertyEditor(TypeInfo(TDate), TJvTFWeeks, 'DisplayDate', TDatePropertyEditor); + RegisterPropertyEditor(TypeInfo(TDate), TJvTFMonths, 'DisplayDate', TDatePropertyEditor); + (* // RegisterPropertyEditor(TypeInfo(string), TJvTFControl, 'Version', TutfVersionEditor); // RegisterPropertyEditor(TypeInfo(string), TJvTFScheduleManager, 'Version', TutfVersionEditor); diff --git a/components/jvcllaz/examples/JvTimeFramework/tfmain.lfm b/components/jvcllaz/examples/JvTimeFramework/tfmain.lfm index 6768fec91..9b52e7403 100644 --- a/components/jvcllaz/examples/JvTimeFramework/tfmain.lfm +++ b/components/jvcllaz/examples/JvTimeFramework/tfmain.lfm @@ -37,12 +37,7 @@ object MainForm: TMainForm Width = 469 ScheduleManager = utfScheduleManager1 ColHdrHeight = 30 - Cols = < - item - SchedDate = 0 - Title = ' - ' - Width = 402 - end> + Cols = <> Template.CompDate = 36406 Template.LinearDayCount = 1 Template.LinearEndDate = 36406 @@ -68,6 +63,7 @@ object MainForm: TMainForm HdrAttr.ParentFont = False HdrAttr.FrameColor = clBlack SelHdrAttr.Font.Color = clBlack + SelHdrAttr.Font.Style = [fsBold] SelHdrAttr.ParentFont = False SelHdrAttr.FrameColor = clBlack FancyRowHdrAttr.Hr2400 = False @@ -79,6 +75,7 @@ object MainForm: TMainForm SelFancyRowHdrAttr.MajorFont.Color = clBlack SelFancyRowHdrAttr.MajorFont.Height = -21 SelFancyRowHdrAttr.TickColor = clBlack + GridLineColor = clSilver PrimeTime.StartTime = 0.333333333333333 PrimeTime.EndTime = 0.708333333333333 GroupHdrAttr.Color = clWindow @@ -90,7 +87,7 @@ object MainForm: TMainForm SelGroupHdrAttr.Font.Color = clBlack SelGroupHdrAttr.ParentFont = False SelGroupHdrAttr.FrameColor = clBlack - LeftCol = 0 + LeftCol = -1 OnDateChanging = JvTFDays1DateChanging OnDateChanged = JvTFDays1DateChanged OnGranularityChanged = JvTFDays1GranularityChanged diff --git a/components/jvcllaz/examples/JvTimeFramework/tfshare.lfm b/components/jvcllaz/examples/JvTimeFramework/tfshare.lfm index 2c2b4c88e..fbc173bc4 100644 --- a/components/jvcllaz/examples/JvTimeFramework/tfshare.lfm +++ b/components/jvcllaz/examples/JvTimeFramework/tfshare.lfm @@ -2,12 +2,13 @@ object Share: TShare Left = 672 Height = 216 Top = 110 - Width = 271 + Width = 250 AutoSize = True Caption = 'Share' ClientHeight = 216 - ClientWidth = 271 + ClientWidth = 250 Color = clBtnFace + Constraints.MinWidth = 250 Font.Color = clWindowText OnClose = FormClose OnShow = FormShow @@ -18,7 +19,7 @@ object Share: TShare Left = 8 Height = 160 Top = 8 - Width = 255 + Width = 234 Align = alClient Anchors = [akTop, akLeft, akBottom] BorderSpacing.Around = 8 @@ -30,7 +31,7 @@ object Share: TShare Left = 6 Height = 34 Top = 176 - Width = 259 + Width = 238 OKButton.Name = 'OKButton' OKButton.DefaultCaption = True HelpButton.Name = 'HelpButton'