tvplanit: Update TEventEditForm to scale correctly in the HighDpi mode of Lazarus 1.8

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@5875 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2017-05-19 20:42:16 +00:00
parent 89f0aff1e3
commit 21df6e63ed
2 changed files with 893 additions and 871 deletions

View File

@ -1,59 +1,71 @@
object DlgEventEdit: TDlgEventEdit
Left = 673
Height = 433
Top = 379
Width = 697
Left = 255
Height = 535
Top = 202
Width = 726
AutoSize = True
BorderStyle = bsToolWindow
Caption = 'Add / Edit Events'
ClientHeight = 433
ClientWidth = 697
Constraints.MinHeight = 378
Constraints.MinWidth = 594
ClientHeight = 535
ClientWidth = 726
OnCreate = FormCreate
OnShow = FormShow
Position = poScreenCenter
LCLVersion = '1.7'
LCLVersion = '1.9.0.0'
object ButtonPanel: TPanel
Left = 0
Height = 36
Top = 397
Width = 697
Height = 37
Top = 498
Width = 726
Align = alBottom
AutoSize = True
BevelOuter = bvNone
ClientHeight = 36
ClientWidth = 697
ClientHeight = 37
ClientWidth = 726
TabOrder = 1
object ResourceNameLbl: TLabel
Left = 8
Height = 16
Top = 5
Width = 100
AnchorSideLeft.Control = ButtonPanel
AnchorSideTop.Control = ButtonPanel
AnchorSideTop.Side = asrCenter
Left = 12
Height = 15
Top = 11
Width = 88
BorderSpacing.Left = 12
Caption = 'Resource Name'
Font.CharSet = ANSI_CHARSET
Font.Color = clMaroon
Font.Height = -13
Font.Name = 'Tahoma'
Font.Style = [fsBold]
ParentColor = False
ParentFont = False
end
object OKBtn: TButton
Left = 528
AnchorSideTop.Side = asrCenter
AnchorSideRight.Control = CancelBtn
Left = 571
Height = 25
Top = 0
Width = 75
Top = 6
Width = 66
Anchors = [akTop, akRight]
BorderSpacing.Top = 6
BorderSpacing.Right = 6
BorderSpacing.Bottom = 6
Caption = '&OK'
Default = True
OnClick = OKBtnClick
TabOrder = 0
end
object CancelBtn: TButton
Left = 608
AnchorSideRight.Control = ButtonPanel
AnchorSideRight.Side = asrBottom
Left = 643
Height = 25
Top = 0
Width = 75
Top = 6
Width = 71
Anchors = [akTop, akRight]
BorderSpacing.Top = 6
BorderSpacing.Right = 12
BorderSpacing.Bottom = 6
Cancel = True
Caption = '&Cancel'
OnClick = CancelBtnClick
@ -61,124 +73,155 @@ object DlgEventEdit: TDlgEventEdit
end
end
object Panel1: TPanel
Left = 0
Height = 397
Top = 0
Width = 697
Left = 12
Height = 486
Top = 12
Width = 702
Align = alClient
BorderSpacing.Left = 12
BorderSpacing.Top = 12
BorderSpacing.Right = 12
BevelOuter = bvNone
BorderWidth = 8
ClientHeight = 397
ClientWidth = 697
ClientHeight = 486
ClientWidth = 702
TabOrder = 0
object AppointmentGroupBox: TGroupBox
Left = 8
Height = 215
Top = 8
Width = 681
Left = 0
Height = 231
Top = 0
Width = 702
Align = alTop
AutoSize = True
Caption = 'Appointment'
ClientHeight = 195
ClientWidth = 677
ClientHeight = 211
ClientWidth = 698
TabOrder = 0
object Bevel1: TBevel
Left = 8
Height = 2
Top = 69
Width = 661
Align = alTop
BorderSpacing.Left = 8
BorderSpacing.Right = 8
AnchorSideLeft.Control = AppointmentGroupBox
AnchorSideTop.Control = LocationEdit
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = DescriptionEdit
AnchorSideRight.Side = asrBottom
Left = 12
Height = 3
Top = 64
Width = 672
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Left = 12
BorderSpacing.Top = 12
Shape = bsTopLine
end
object Bevel2: TBevel
Left = 8
Height = 2
Top = 152
Width = 661
Align = alTop
BorderSpacing.Left = 8
BorderSpacing.Right = 8
AnchorSideLeft.Control = AppointmentGroupBox
AnchorSideTop.Control = EndDate
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = DescriptionEdit
AnchorSideRight.Side = asrBottom
Left = 12
Height = 3
Top = 167
Width = 672
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Left = 12
BorderSpacing.Top = 12
Shape = bsTopLine
end
object PanelDescription: TPanel
Left = 0
Height = 69
Top = 0
Width = 677
Align = alTop
BevelOuter = bvNone
ClientHeight = 69
ClientWidth = 677
TabOrder = 0
object DescriptionLbl: TLabel
Left = 5
AnchorSideTop.Control = DescriptionEdit
AnchorSideTop.Side = asrCenter
AnchorSideRight.Control = DescriptionEdit
Left = 71
Height = 15
Top = 15
Top = 4
Width = 63
Anchors = [akTop, akRight]
BorderSpacing.Left = 12
BorderSpacing.Right = 8
Caption = 'Description:'
ParentColor = False
end
object DescriptionEdit: TEdit
Left = 88
AnchorSideLeft.Control = AlarmAdvance
AnchorSideTop.Control = AppointmentGroupBox
AnchorSideRight.Control = IntervalUpDown
AnchorSideRight.Side = asrBottom
Left = 142
Height = 23
Top = 8
Width = 575
Top = 0
Width = 542
Anchors = [akTop, akLeft, akRight]
TabOrder = 0
Text = 'DescriptionEdit'
end
object LocationLbl: TLabel
Left = 5
AnchorSideTop.Control = LocationEdit
AnchorSideTop.Side = asrCenter
AnchorSideRight.Control = LocationEdit
Left = 85
Height = 15
Top = 43
Top = 33
Width = 49
Anchors = [akTop, akRight]
BorderSpacing.Right = 8
Caption = 'Location:'
FocusControl = LocationEdit
ParentColor = False
end
object LocationEdit: TEdit
Left = 86
AnchorSideLeft.Control = AlarmAdvance
AnchorSideTop.Control = DescriptionEdit
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = Bevel3
AnchorSideRight.Side = asrBottom
Left = 142
Height = 23
Top = 39
Width = 235
Top = 29
Width = 205
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Top = 6
BorderSpacing.Right = 12
TabOrder = 1
end
object CategoryLbl: TLabel
AnchorSideLeft.Control = Bevel3
AnchorSideTop.Control = Category
AnchorSideTop.Side = asrCenter
AnchorSideRight.Control = Category
Left = 368
Height = 15
Top = 33
Width = 51
BorderSpacing.Left = 12
BorderSpacing.Right = 12
Caption = 'Category:'
ParentColor = False
end
object Category: TComboBox
Left = 484
AnchorSideLeft.Control = CategoryLbl
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = DescriptionEdit
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = DescriptionEdit
AnchorSideRight.Side = asrBottom
Left = 431
Height = 23
Top = 40
Width = 180
Top = 29
Width = 253
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Top = 6
ItemHeight = 15
OnDrawItem = CategoryDrawItem
TabOrder = 2
end
object CategoryLbl: TLabel
Left = 403
Height = 15
Top = 43
Width = 51
Caption = 'Category:'
ParentColor = False
end
end
object PanelTimes: TPanel
Left = 0
Height = 81
Top = 71
Width = 677
Align = alTop
BevelOuter = bvNone
ClientHeight = 81
ClientWidth = 677
TabOrder = 1
object imgClock: TImage
Left = 8
AnchorSideLeft.Control = AppointmentGroupBox
AnchorSideTop.Control = Bevel1
Left = 16
Height = 32
Top = 5
Top = 76
Width = 32
BorderSpacing.Left = 16
BorderSpacing.Top = 12
Picture.Data = {
1754506F727461626C654E6574776F726B477261706869639C0A000089504E47
0D0A1A0A0000000D4948445200000020000000200806000000737A7AF4000000
@ -269,88 +312,59 @@ object DlgEventEdit: TDlgEventEdit
}
end
object CBAllDay: TCheckBox
Left = 89
AnchorSideLeft.Control = imgClock
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = imgClock
Left = 60
Height = 19
Top = 3
Top = 76
Width = 89
BorderSpacing.Left = 12
Caption = 'All Day Event'
OnClick = CBAllDayClick
TabOrder = 0
TabOrder = 3
end
object StartTimeLbl: TLabel
Left = 47
AnchorSideTop.Control = StartDate
AnchorSideTop.Side = asrCenter
AnchorSideRight.Control = StartDate
Left = 80
Height = 15
Top = 23
Top = 105
Width = 54
Alignment = taRightJustify
Anchors = [akTop, akRight]
BorderSpacing.Right = 8
Caption = 'Start time:'
ParentColor = False
end
object StartDate: TDateEdit
Left = 109
Height = 23
Top = 19
Width = 104
CalendarDisplaySettings = [dsShowHeadings, dsShowDayNames]
DateOrder = doNone
ButtonWidth = 23
Glyph.Data = {
36040000424D3604000000000000360000002800000010000000100000000100
2000000000000004000064000000640000000000000000000000FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00D69E
72C4D3996EF4D19668FFCE9263FFCB8E5EFFC98A5BFFC78756FFC38452FFC384
52FFC38452FFC38452FFC38452FFC38452FFBB7742B0FFFFFF00FFFFFF00D7A1
75FFF8F2EDFFF7F0EAFFF6EDE6FFF4EAE2FFF3E7DEFFF1E4DBFFF0E2D8FFEAD6
C8FFF2E5DCFFFAF4F1FFF9F3F0FFFAF5F2FFC58A5DFDFFFFFF00FFFFFF00D9A4
7AFFF9F3EEFFEBD2BEFFFFFFFFFFEBD3BFFFFFFFFFFFEBD3C0FFFFFFFFFFEAC7
ADFFECD9CDFFF1E4DBFFF9F3F0FFF9F2EFFFC68C5FFFFFFFFF00FFFFFF00DDA8
7EFFF9F3EFFFEBD0BAFFEBD0BBFF75B57AFF75B57AFF75B57AFFEBD1BDFFEACD
B5FFFAF4F0FFEBD9CCFFF1E4DBFFFAF4F1FFC68A5CFFFFFFFF00FFFFFF00DFAA
82FFF9F3EFFFEACEB7FFFFFFFFFF75B57AFF94D49BFF74B579FFFFFFFFFFEACF
BAFFFBF6F2FFFAF3F0FFEBD8CBFFF2E6DDFFC88D5FFFFFFFFF00FFFFFF00E1AE
87FFFAF4F0FFEACBB2FFEACCB3FF75B57AFF74B579FF73B478FFEACEB7FF70B3
75FF6FB274FF6EB172FFE8C8AEFFEAD7C9FFC48654FFFFFFFF00FFFFFF00E3B1
8CFFFAF6F1FFEAC9AEFFFFFFFFFFEAC9B0FFFFFFFFFFE9CBB3FFFFFFFFFF6FB1
73FF8ED295FF6BAF6FFFFFFFFFFFF1E5DBFFC68655FFFFFFFF00FFFFFF00E5B4
8FFFFAF6F2FFE9C6AAFFE9C6ACFFEAC7ACFFE9C7ADFFE9C9AEFFE9C9B0FF6CB0
71FF6AAF6EFF68AD6DFFE8CCB5FFF2E7DEFFC88A59FFFFFFFF00FFFFFF00E7B7
94FFFBF7F4FFE9C3A6FFFFFFFFFFE8C4A9FFFFFFFFFFE9C6AAFFFFFFFFFFE8C7
ACFFFFFFFFFFE8C8B0FFFFFFFFFFF7F1EBFFCB8F5FFFFFFFFF00FFFFFF00E9BA
98FFFBF7F4FF65A4FFFF64A3FFFF62A2FFFF61A1FFFF5F9FFFFF5C9DFFFF5A9A
FFFF5798FFFF5495FFFF5294FFFFFBF7F4FFCE9364FFFFFFFF00FFFFFF00EBBD
9BFFFBF7F4FF64A4FFFF79BDFFFF75BBFFFF71B9FFFF6DB8FFFF68B3FFFF61B0
FFFF5AABFFFF54A7FFFF3B7DFFFFFBF7F4FFD1976AFFFFFFFF00FFFFFF00ECBF
9EFFFBF7F4FF65A4FFFF64A3FFFF60A0FFFF5D9EFFFF5899FFFF5496FFFF4D90
FFFF478BFFFF4284FFFF3D7FFFFFFBF7F4FFD49B6FFFFFFFFF00FFFFFF00EEC1
A1EBFBF7F4FFFBF7F4FFFBF7F4FFFBF7F4FFFBF7F4FFFBF7F4FFFBF7F4FFFBF7
F4FFFBF7F4FFFBF7F4FFFBF7F4FFFBF7F4FFD7A074F8FFFFFF00FFFFFF00EFC2
A37EEFC1A2E3EDC09FFFEBBE9DFFEBBC9AFFE9BA96FFE7B793FFE6B590FFE4B2
8CFFE2AF88FFE0AC84FFDDA980FFDCA57DFFDAA37ACAFFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00
}
NumGlyphs = 1
MaxLength = 0
TabOrder = 1
end
object EndTimeLbl: TLabel
Left = 47
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = EndDate
AnchorSideTop.Side = asrCenter
AnchorSideRight.Control = EndDate
Left = 84
Height = 15
Top = 48
Top = 136
Width = 50
Alignment = taRightJustify
Anchors = [akTop, akRight]
BorderSpacing.Right = 8
Caption = 'End time:'
ParentColor = False
end
object EndDate: TDateEdit
Left = 109
object StartDate: TDateEdit
AnchorSideLeft.Control = AlarmAdvance
AnchorSideTop.Control = CBAllDay
AnchorSideTop.Side = asrBottom
Left = 142
Height = 23
Top = 46
Width = 104
Top = 101
Width = 93
CalendarDisplaySettings = [dsShowHeadings, dsShowDayNames]
DateOrder = doNone
ButtonWidth = 23
BorderSpacing.Top = 6
Glyph.Data = {
36040000424D3604000000000000360000002800000010000000100000000100
2000000000000004000064000000640000000000000000000000FFFFFF00FFFF
@ -389,61 +403,87 @@ object DlgEventEdit: TDlgEventEdit
}
NumGlyphs = 1
MaxLength = 0
TabOrder = 2
end
object RecurringLbl: TLabel
Left = 395
Height = 15
Top = 6
Width = 136
Caption = 'Appointment Recurrence:'
ParentColor = False
end
object RecurringType: TComboBox
Left = 395
Height = 23
Top = 25
Width = 171
ItemHeight = 15
OnChange = RecurringTypeChange
Style = csDropDownList
TabOrder = 3
end
object edtUnusedPlaceholder: TEdit
Left = 583
Height = 23
Top = 25
Width = 65
TabOrder = 4
Text = 'Placeholder control'
Visible = False
Text = '01.01.2000'
end
object IntervalUpDown: TUpDown
Left = 648
object EndDate: TDateEdit
AnchorSideLeft.Control = AlarmAdvance
AnchorSideTop.Control = StartDate
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = StartDate
AnchorSideRight.Side = asrBottom
Left = 142
Height = 23
Top = 25
Width = 16
Associate = edtUnusedPlaceholder
Max = 32767
Min = 0
OnClick = IntervalUpDownClick
Position = 0
TabOrder = 5
Wrap = False
Top = 132
Width = 93
CalendarDisplaySettings = [dsShowHeadings, dsShowDayNames]
DateOrder = doNone
ButtonWidth = 23
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Top = 8
Glyph.Data = {
36040000424D3604000000000000360000002800000010000000100000000100
2000000000000004000064000000640000000000000000000000FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00D69E
72C4D3996EF4D19668FFCE9263FFCB8E5EFFC98A5BFFC78756FFC38452FFC384
52FFC38452FFC38452FFC38452FFC38452FFBB7742B0FFFFFF00FFFFFF00D7A1
75FFF8F2EDFFF7F0EAFFF6EDE6FFF4EAE2FFF3E7DEFFF1E4DBFFF0E2D8FFEAD6
C8FFF2E5DCFFFAF4F1FFF9F3F0FFFAF5F2FFC58A5DFDFFFFFF00FFFFFF00D9A4
7AFFF9F3EEFFEBD2BEFFFFFFFFFFEBD3BFFFFFFFFFFFEBD3C0FFFFFFFFFFEAC7
ADFFECD9CDFFF1E4DBFFF9F3F0FFF9F2EFFFC68C5FFFFFFFFF00FFFFFF00DDA8
7EFFF9F3EFFFEBD0BAFFEBD0BBFF75B57AFF75B57AFF75B57AFFEBD1BDFFEACD
B5FFFAF4F0FFEBD9CCFFF1E4DBFFFAF4F1FFC68A5CFFFFFFFF00FFFFFF00DFAA
82FFF9F3EFFFEACEB7FFFFFFFFFF75B57AFF94D49BFF74B579FFFFFFFFFFEACF
BAFFFBF6F2FFFAF3F0FFEBD8CBFFF2E6DDFFC88D5FFFFFFFFF00FFFFFF00E1AE
87FFFAF4F0FFEACBB2FFEACCB3FF75B57AFF74B579FF73B478FFEACEB7FF70B3
75FF6FB274FF6EB172FFE8C8AEFFEAD7C9FFC48654FFFFFFFF00FFFFFF00E3B1
8CFFFAF6F1FFEAC9AEFFFFFFFFFFEAC9B0FFFFFFFFFFE9CBB3FFFFFFFFFF6FB1
73FF8ED295FF6BAF6FFFFFFFFFFFF1E5DBFFC68655FFFFFFFF00FFFFFF00E5B4
8FFFFAF6F2FFE9C6AAFFE9C6ACFFEAC7ACFFE9C7ADFFE9C9AEFFE9C9B0FF6CB0
71FF6AAF6EFF68AD6DFFE8CCB5FFF2E7DEFFC88A59FFFFFFFF00FFFFFF00E7B7
94FFFBF7F4FFE9C3A6FFFFFFFFFFE8C4A9FFFFFFFFFFE9C6AAFFFFFFFFFFE8C7
ACFFFFFFFFFFE8C8B0FFFFFFFFFFF7F1EBFFCB8F5FFFFFFFFF00FFFFFF00E9BA
98FFFBF7F4FF65A4FFFF64A3FFFF62A2FFFF61A1FFFF5F9FFFFF5C9DFFFF5A9A
FFFF5798FFFF5495FFFF5294FFFFFBF7F4FFCE9364FFFFFFFF00FFFFFF00EBBD
9BFFFBF7F4FF64A4FFFF79BDFFFF75BBFFFF71B9FFFF6DB8FFFF68B3FFFF61B0
FFFF5AABFFFF54A7FFFF3B7DFFFFFBF7F4FFD1976AFFFFFFFF00FFFFFF00ECBF
9EFFFBF7F4FF65A4FFFF64A3FFFF60A0FFFF5D9EFFFF5899FFFF5496FFFF4D90
FFFF478BFFFF4284FFFF3D7FFFFFFBF7F4FFD49B6FFFFFFFFF00FFFFFF00EEC1
A1EBFBF7F4FFFBF7F4FFFBF7F4FFFBF7F4FFFBF7F4FFFBF7F4FFFBF7F4FFFBF7
F4FFFBF7F4FFFBF7F4FFFBF7F4FFFBF7F4FFD7A074F8FFFFFF00FFFFFF00EFC2
A37EEFC1A2E3EDC09FFFEBBE9DFFEBBC9AFFE9BA96FFE7B793FFE6B590FFE4B2
8CFFE2AF88FFE0AC84FFDDA980FFDCA57DFFDAA37ACAFFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00
}
NumGlyphs = 1
MaxLength = 0
TabOrder = 6
end
object IntervalLbl: TLabel
Left = 583
Height = 15
Top = 5
Width = 77
Caption = 'Interval (days):'
ParentColor = False
object Bevel3: TBevel
AnchorSideLeft.Control = StartTimePlaceholder
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = CBAllDay
AnchorSideBottom.Control = EndDate
AnchorSideBottom.Side = asrBottom
Left = 356
Height = 79
Top = 76
Width = 3
Anchors = [akTop, akLeft, akBottom]
BorderSpacing.Left = 16
Shape = bsLeftLine
end
object ImgRecurring: TImage
Left = 360
AnchorSideLeft.Control = Bevel3
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = imgClock
Left = 375
Height = 32
Top = 5
Top = 76
Width = 32
BorderSpacing.Left = 16
Picture.Data = {
1754506F727461626C654E6574776F726B477261706869638006000089504E47
0D0A1A0A0000000D4948445200000020000000200806000000737A7AF4000000
@ -500,23 +540,46 @@ object DlgEventEdit: TDlgEventEdit
6CE0F7FA5780010015A12AA4DE4975590000000049454E44AE426082
}
end
object RecurrenceEndsLbl: TLabel
Left = 424
object RecurringLbl: TLabel
AnchorSideLeft.Control = ImgRecurring
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = CBAllDay
AnchorSideTop.Side = asrCenter
Left = 419
Height = 15
Top = 59
Width = 28
Alignment = taRightJustify
Caption = 'Until:'
Top = 78
Width = 136
BorderSpacing.Left = 12
Caption = 'Appointment Recurrence:'
ParentColor = False
end
object RepeatUntil: TDateEdit
Left = 464
object RecurringType: TComboBox
AnchorSideLeft.Control = RecurringLbl
AnchorSideTop.Control = StartDate
AnchorSideRight.Control = RecurringLbl
AnchorSideRight.Side = asrBottom
Left = 419
Height = 23
Top = 55
Width = 100
Top = 101
Width = 136
Anchors = [akTop, akLeft, akRight]
ItemHeight = 15
OnChange = RecurringTypeChange
Style = csDropDownList
TabOrder = 8
end
object RepeatUntil: TDateEdit
AnchorSideTop.Control = EndDate
AnchorSideRight.Control = IntervalUpDown
AnchorSideRight.Side = asrBottom
Left = 522
Height = 23
Top = 132
Width = 162
CalendarDisplaySettings = [dsShowHeadings, dsShowDayNames]
DateOrder = doNone
ButtonWidth = 23
Anchors = [akTop, akRight]
Glyph.Data = {
36040000424D3604000000000000360000002800000010000000100000000100
2000000000000004000064000000640000000000000000000000FFFFFF00FFFF
@ -555,31 +618,77 @@ object DlgEventEdit: TDlgEventEdit
}
NumGlyphs = 1
MaxLength = 0
TabOrder = 6
TabOrder = 11
end
object Bevel3: TBevel
Left = 350
Height = 76
Top = 1
Width = 2
Shape = bsLeftLine
object RecurrenceEndsLbl: TLabel
AnchorSideTop.Control = RepeatUntil
AnchorSideTop.Side = asrCenter
AnchorSideRight.Control = RepeatUntil
Left = 482
Height = 15
Top = 136
Width = 28
Alignment = taRightJustify
Anchors = [akTop, akRight]
BorderSpacing.Right = 12
Caption = 'Until:'
ParentColor = False
end
object IntervalLbl: TLabel
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = RecurringLbl
AnchorSideRight.Control = IntervalUpDown
AnchorSideRight.Side = asrBottom
Left = 607
Height = 15
Top = 78
Width = 77
Anchors = [akTop, akRight]
BorderSpacing.Left = 36
Caption = 'Interval (days):'
ParentColor = False
end
object CustomInterval: TEdit
AnchorSideLeft.Control = RecurringType
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = StartDate
Left = 563
Height = 23
Top = 101
Width = 106
Alignment = taRightJustify
BorderSpacing.Left = 8
BorderSpacing.Right = 3
MaxLength = 5
OnChange = CustomIntervalChange
TabOrder = 9
end
object IntervalUpDown: TUpDown
AnchorSideLeft.Control = CustomInterval
AnchorSideLeft.Side = asrBottom
AnchorSideRight.Side = asrBottom
Left = 672
Height = 23
Top = 101
Width = 12
Associate = CustomInterval
BorderSpacing.Right = 12
Max = 32767
Min = 0
OnClick = IntervalUpDownClick
Position = 0
TabOrder = 10
Wrap = False
end
object PanelAlarm: TPanel
Left = 0
Height = 41
Top = 154
Width = 677
Align = alTop
BevelOuter = bvNone
ClientHeight = 41
ClientWidth = 677
TabOrder = 2
object ImgAlarm: TImage
Left = 8
AnchorSideLeft.Control = AppointmentGroupBox
AnchorSideTop.Control = Bevel2
Left = 16
Height = 32
Top = 5
Top = 179
Width = 32
BorderSpacing.Left = 16
BorderSpacing.Top = 12
Picture.Data = {
1754506F727461626C654E6574776F726B477261706869633E08000089504E47
0D0A1A0A0000000D4948445200000020000000200806000000737A7AF4000000
@ -651,50 +760,79 @@ object DlgEventEdit: TDlgEventEdit
}
end
object AlarmSet: TCheckBox
Left = 47
AnchorSideLeft.Control = ImgAlarm
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = AlarmAdvance
AnchorSideTop.Side = asrCenter
Left = 60
Height = 19
Top = 7
Top = 180
Width = 74
BorderSpacing.Left = 12
BorderSpacing.Right = 8
Caption = '&Reminder:'
OnClick = AlarmSetClick
TabOrder = 0
TabOrder = 12
end
object AlarmAdvance: TEdit
Left = 136
AnchorSideLeft.Control = AlarmSet
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = Bevel2
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = AdvanceUpDown
AnchorSideRight.Side = asrBottom
Left = 142
Height = 23
Top = 5
Width = 58
Top = 178
Width = 77
BorderSpacing.Top = 8
OnChange = AlarmAdvanceChange
TabOrder = 1
TabOrder = 13
Text = 'AlarmAdvance'
end
object AdvanceUpDown: TUpDown
Left = 194
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = AlarmAdvance
AnchorSideTop.Side = asrCenter
AnchorSideRight.Control = StartDate
AnchorSideRight.Side = asrBottom
Left = 223
Height = 23
Top = 5
Width = 14
Top = 178
Width = 12
Anchors = [akTop, akRight]
Associate = AlarmAdvance
Max = 120
Min = 1
OnClick = AdvanceUpDownClick
Position = 1
TabOrder = 2
TabOrder = 14
Wrap = False
end
object AlarmAdvanceType: TComboBox
Left = 231
AnchorSideLeft.Control = AdvanceUpDown
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = AlarmAdvance
AnchorSideTop.Side = asrCenter
Left = 247
Height = 23
Top = 4
Top = 178
Width = 93
BorderSpacing.Left = 12
ItemHeight = 15
Style = csDropDownList
TabOrder = 3
TabOrder = 15
end
object SoundFinderBtn: TSpeedButton
Left = 328
Height = 22
Top = 4
Width = 23
AnchorSideLeft.Control = AlarmAdvanceType
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = AlarmAdvanceType
AnchorSideTop.Side = asrCenter
Left = 356
Height = 24
Top = 177
Width = 24
BorderSpacing.Left = 16
Glyph.Data = {
F6000000424DF600000000000000760000002800000010000000100000000100
0400000000008000000000000000000000001000000010000000000000000000
@ -707,28 +845,58 @@ object DlgEventEdit: TDlgEventEdit
}
OnClick = SoundFinderBtnClick
end
object EndTimePlaceholder: TEdit
AnchorSideLeft.Control = EndDate
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = EndDate
AnchorSideRight.Control = AlarmAdvanceType
AnchorSideRight.Side = asrBottom
Left = 247
Height = 23
Top = 132
Width = 93
Alignment = taCenter
BorderSpacing.Left = 12
TabOrder = 7
Text = 'EndTimePlaceholder'
end
object StartTimePlaceholder: TEdit
AnchorSideLeft.Control = StartDate
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = StartDate
AnchorSideRight.Control = AlarmAdvanceType
AnchorSideRight.Side = asrBottom
Left = 247
Height = 23
Top = 101
Width = 93
Alignment = taCenter
BorderSpacing.Left = 12
TabOrder = 5
Text = 'StartTimePlaceholder'
end
end
object NotesMemo: TMemo
Left = 8
Height = 158
Top = 231
Width = 681
Left = 0
Height = 243
Top = 243
Width = 702
Align = alClient
Constraints.MinHeight = 200
ScrollBars = ssVertical
TabOrder = 1
end
object Bevel4: TBevel
Left = 8
Height = 8
Top = 223
Width = 681
Left = 0
Height = 12
Top = 231
Width = 702
Align = alTop
Shape = bsSpacer
end
end
object FileDialog: TOpenDialog
left = 320
top = 256
left = 440
top = 352
end
end

View File

@ -72,13 +72,12 @@ type
TDlgEventEdit = class(TForm)
AlarmAdvance: TEdit;
Bevel4: TBevel;
StartTimePlaceholder: TEdit;
EndTimePlaceholder: TEdit;
LocationEdit: TEdit;
LocationLbl: TLabel;
NotesMemo: TMemo;
Panel1: TPanel;
PanelAlarm: TPanel;
PanelTimes: TPanel;
PanelDescription: TPanel;
StartDate: TDateEdit;
EndDate: TDateEdit;
RepeatUntil: TDateEdit;
@ -110,23 +109,23 @@ type
AlarmAdvanceType: TComboBox;
AdvanceUpDown: TUpDown;
CBAllDay: TCheckBox;
edtUnusedPlaceholder: TEdit;
CustomInterval: TEdit;
imgClock: TImage;
RecurrenceEndsLbl: TLabel;
procedure AdvanceUpDownClick(Sender: TObject; Button: TUDBtnType);
procedure AlarmAdvanceChange(Sender: TObject);
procedure AlarmSetClick(Sender: TObject);
procedure CancelBtnClick(Sender: TObject);
procedure CategoryDrawItem(Control: TWinControl; Index: Integer;
ARect: TRect; State: TOwnerDrawState);
procedure OKBtnClick(Sender: TObject);
procedure CancelBtnClick(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure AlarmAdvanceChange(Sender: TObject);
procedure AdvanceUpDownClick(Sender: TObject; Button: TUDBtnType);
procedure CBAllDayClick(Sender: TObject);
procedure CustomIntervalChange(Sender: TObject);
procedure OKBtnClick(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure IntervalUpDownClick(Sender: TObject; Button: TUDBtnType);
procedure RecurringTypeChange(Sender: TObject);
procedure AlarmSetClick(Sender: TObject);
procedure CBAllDayClick(Sender: TObject);
procedure SoundFinderBtnClick(Sender: TObject);
procedure FormShow(Sender: TObject);
private { Private declarations }
{$IFDEF NEW_TIME_EDIT}
@ -139,7 +138,6 @@ type
FDatastore: TVpCustomDatastore;
AAVerifying: Boolean;
CIVerifying: Boolean;
FCustomInterval : TVpRightAlignedEdit;
procedure PopLists;
procedure PositionControls;
procedure LoadCaptions;
@ -170,7 +168,7 @@ type
public
constructor Create(AOwner : TComponent); override;
function Execute(Event: TVpEvent): Boolean; reintroduce;
function AddNewEvent(StartTime, EndTime: TDateTime): Boolean;
function AddNewEvent(PlaceholderStartTime, EndTimePlaceholder: TDateTime): Boolean;
published
{properties}
property TimeFormat: TVpTimeFormat read FTimeFormat write FTimeFormat default tf12Hour;
@ -222,11 +220,16 @@ begin
StartTime := TCombobox.Create(self);
StartTime.ItemIndex := -1;
{$ENDIF}
StartTime.Width := 83;
StartTime.Parent := PanelTimes;
StartTime.Parent := AppointmentGroupbox;
StartTime.Width := StartDate.Width;
StartTime.Left := AlarmAdvanceType.Left;
StartTime.Top := StartDate.Top;
StartTime.TabOrder:= StartDate.TabOrder+ 1;
StartTime.AnchorSideLeft.Control := AlarmAdvanceType;
StartTime.AnchorSideTop.Control := StartDate;
StartTime.Anchors := [akLeft, akTop];
StartTime.TabOrder := StartDate.TabOrder + 1;
Bevel3.AnchorsideLeft.Control := Starttime;
StartTimePlaceHolder.Free;
{$IFDEF NEW_TIME_EDIT}
EndTime := TTimeEdit.Create(self);
@ -234,13 +237,16 @@ begin
EndTime := TCombobox.Create(self);
EndTime.ItemIndex := -1;
{$ENDIF}
EndTime.Width := 83;
EndTime.Parent := PanelTimes;
EndTime.Parent := AppointmentGroupbox;
EndTime.Width := EndDate.Width;
EndTime.Left := AlarmAdvanceType.Left;
EndTime.Top := EndDate.Top;
EndTime.AnchorSideLeft.Control := AlarmAdvanceType;
EndTime.AnchorSideTop.Control := EndDate;
EndTime.Anchors := [akLeft, akTop];
EndTime.TabOrder := EndDate.TabOrder + 1;
EndTimePlaceHolder.Free;
SoundFinderBtn.Top := AlarmAdvanceType.Top;
SoundFinderBtn.Height := AlarmAdvanceType.Height;
SoundFinderBtn.Width := SoundFinderBtn.Height;
@ -248,19 +254,7 @@ begin
PopLists;
LoadCaptions;
EndDate.Enabled := False;
FCustomInterval := TVpRightAlignedEdit.Create(Self);
with FCustomInterval do begin
Parent := PanelTimes;
Top := IntervalUpDown.Top + 1;
Left := IntervalUpDown.Left - 65;
Height := IntervalUpDown.Height - 1;
Width := 65;
MaxLength := 5;
OnChange := CustomIntervalChange;
TabOrder := edtUnusedPlaceholder.TabOrder;
end;
IntervalUpDown.Associate := FCustomInterval;
EndTime.Enabled := false;
end;
{=====}
@ -285,7 +279,7 @@ begin
EndDate.Date := trunc(tStart);
{$IFDEF NEW_TIME_EDIT}
StartTime.Time := TimeOf(tEnd);
EndTime.Time := timeOf(tStart);
EndTime.Time := TimeOf(tStart);
{$ELSE}
StartTime.Text := FormatDateTime('hh:nn', TimeOf(tEnd));
EndTime.Text := FormatDateTime('hh:nn', TimeOf(tStart));
@ -360,8 +354,8 @@ begin
StartDate.Enabled := not CBAllDay.Checked;
EndDate.Enabled := not CBAllDay.Checked;
EndTime.Enabled := not CBAllDay.Checked;
StartTime.Enabled := not CBAllDay.Checked;
EndTime.Enabled := not CBAllDay.Checked;
DescriptionEdit.Text := Event.Description;
LocationEdit.Text := Event.Location;
@ -375,7 +369,7 @@ begin
AlarmAdvanceType.ItemIndex := Ord(Event.AlarmAdvanceType);
RecurringType.ItemIndex := Ord(Event.RepeatCode);
RecurringTypeChange(Self);
FCustomInterval.Text := IntToStr(Event.CustomInterval);
CustomInterval.Text := IntToStr(Event.CustomInterval);
Category.Items.Clear;
@ -407,7 +401,7 @@ begin
Event.AlarmAdvance := StrToIntDef(AlarmAdvance.Text, 0);
Event.AlarmAdvanceType := TVpAlarmAdvType(AlarmAdvanceType.ItemIndex);
Event.RepeatCode := TVpRepeatType(RecurringType.ItemIndex);
Event.CustomInterval := StrToIntDef(FCustomInterval.Text, 0);
Event.CustomInterval := StrToIntDef(CustomInterval.Text, 0);
Event.AllDayEvent := CBAllDay.Checked;
Event.DingPath := AlarmWavPath;
end;
@ -443,11 +437,11 @@ begin
StringList.Add(IntToStr(Hour) + ':' + MinStr + AMPMStr);
end;
end;
StartTime.Items.Assign(StringList);
StartTime.ItemIndex := 0;
PlaceholderStartTime.Items.Assign(StringList);
PlaceholderStartTime.ItemIndex := 0;
EndTime.Items.Assign(StringList);
EndTime.ItemIndex := 0;
EndTimePlaceholder.Items.Assign(StringList);
EndTimePlaceholder.ItemIndex := 0;
finally
StringList.Free;
end;
@ -531,13 +525,13 @@ begin
{ Don't allow non numeric values. }
if CIVerifying then Exit;
CIVerifying := true;
Str := FCustomInterval.Text;
Str := CustomInterval.Text;
for I := 1 to Length(Str) do
if (Str[I] in ['0'..'9']) then
Continue
else
Delete(Str, I, 1);
FCustomInterval.Text := Str;
CustomInterval.Text := Str;
if Str <> '' then
IntervalUpDown.Position := StrToInt(Str);
CIVerifying := false;
@ -547,7 +541,7 @@ end;
procedure TDlgEventEdit.IntervalUpDownClick(Sender: TObject; Button: TUDBtnType);
begin
Unused(Button);
FCustomInterval.Text := IntToStr(IntervalUpDown.Position);
CustomInterval.Text := IntToStr(IntervalUpDown.Position);
end;
{=====}
@ -559,13 +553,13 @@ begin
RecurrenceEndsLbl.Enabled := (RecurringType.ItemIndex > 0);
RepeatUntil.Enabled := RecurrenceEndsLbl.Enabled;
FCustomInterval.Enabled := RecurringType.ItemIndex = 7;
IntervalLbl.Enabled := FCustomInterval.Enabled;
IntervalUpDown.Enabled := FCustomInterval.Enabled;
if FCustomInterval.Enabled then begin
FCustomInterval.Text := IntToStr(IntervalUpDown.Position);
CustomInterval.Enabled := RecurringType.ItemIndex = 7;
IntervalLbl.Enabled := CustomInterval.Enabled;
IntervalUpDown.Enabled := CustomInterval.Enabled;
if CustomInterval.Enabled then begin
CustomInterval.Text := IntToStr(IntervalUpDown.Position);
if Visible then
FCustomInterval.SetFocus;
CustomInterval.SetFocus;
end;
end;
{=====}
@ -583,9 +577,9 @@ end;
procedure TDlgEventEdit.CBAllDayClick(Sender: TObject);
begin
StartDate.Enabled := not CBAllDay.Checked;
StartTime.Enabled := not CBAllDay.Checked;
EndDate.Enabled := not CBAllDay.Checked;
EndTime.Enabled := not CBAllDay.Checked;
StartTime.Enabled := not CBAllDay.Checked;
end;
{=====}
@ -640,173 +634,33 @@ var
cnv: TControlCanvas;
editHeight: Integer;
begin
editHeight := startDate.Height; //ScaleY(startDate.Height, DesigntimeDPI);
editHeight := startDate.Height;
startDate.ButtonWidth := editHeight;
endDate.ButtonWidth := editHeight;
{$IFDEF NEW_TIME_EDIT}
startTime.ButtonWidth := editHeight;
endTime.ButtonWidth := editHeight;
StartTime.ButtonWidth := editHeight;
EndTime.ButtonWidth := editHeight;
{$ENDIF}
// This is needed as workaround for the combobox height at higher dpi.
// We design it with Style csDropdown where the height is correct, and then
// use the corresponding, correct ItemHeight after switching to csOwnerDrawFixed
// (which is needed to draw the color boxes).
h := Category.ItemHeight;
Category.Style := csOwnerDrawFixed;
Category.ItemHeight := h+1;
// *** Horizontal positions ***
// Position controls according to label widths
w := MaxValue([GetLabelWidth(DescriptionLbl), GetLabelWidth(LocationLbl), GetLabelWidth(StartTimeLbl), GetLabelWidth(EndTimeLbl)]);
if w < GetlabelWidth(StartTimeLbl) + imgClock.Picture.Width + DELTA then
w := GetLabelWidth(StartTimeLbl) + imgClock.Picture.Width + DELTA;
DescriptionEdit.Left := w + 2*DELTA;
DescriptionEdit.Width := PanelDescription.ClientWidth - DescriptionEdit.Left - DELTA;
DescriptionLbl.Left := DescriptionEdit.Left - GetLabelWidth(DescriptionLbl) - DELTA;
LocationEdit.Left := DescriptionEdit.Left;
LocationLbl.Left := LocationEdit.Left - GetLabelWidth(LocationLbl) - DELTA;
RepeatUntil.ButtonWidth := editHeight;
cnv := TControlCanvas.Create;
try
cnv.Control := startDate;
cnv.Font.Assign(startDate.Font);
w := cnv.TextWidth('99.99.9999') + startDate.ButtonWidth + 10;
cnv.Control := StartDate;
w := cnv.TextWidth(FormatDateTime(' dd. mm. yyyy ', EncodeDate(2000,12,30)));
Startdate.Width := w + StartDate.ButtonWidth;
EndDate.Width := StartDate.Width;
StartTime.Width := StartDate.Width;
EndTime.Width := StartDate.Width;
finally
cnv.Free;
end;;
StartDate.Width := w;
EndDate.Width := w;
StartTime.Width := w;
EndTime.Width := w;
StartDate.Left := DescriptionEdit.Left;
StartTimeLbl.Left := StartDate.Left - GetLabelWidth(StartTimeLbl) - DELTA;
EndDate.Left := StartDate.Left;
EndTimeLbl.Left := EndDate.Left - GetLabelWidth(EndTimeLbl) - DELTA;
StartTime.Left := StartDate.Left + StartDate.Width + DELTA;
EndTime.Left := StartTime.Left;
CbAllDay.Left := StartDate.Left; //ImgClock.Left + ImgClock.Picture.Width + DELTA;
AlarmSet.Left := ImgAlarm.Left + ImgAlarm.Picture.Width + DELTA;
Bevel3.Left := StartTime.Left + StartTime.Width + 2*DELTA;
ImgRecurring.Left := Bevel3.Left + Bevel3.Width + 2*DELTA;
RecurringType.Left := RightOf(ImgRecurring) + DELTA;
RecurringLbl.Left := ImgRecurring.Left + ImgRecurring.Picture.Width + DELTA;
w := Max(
GetLabelWidth(RecurringLbl) + ImgRecurring.Picture.Width + DELTA,
GetLabelWidth(RecurrenceEndsLbl) + DELTA + RepeatUntil.Width
);
if w > RecurringType.Width then RecurringType.Width := w;
RepeatUntil.Left := RightOf(RecurringType) - RepeatUntil.Width;
RecurrenceEndsLbl.Left := RepeatUntil.Left - DELTA - GetLabelWIdth(RecurrenceEndsLbl);
w := GetLabelWidth(IntervalLbl);
if w > FCustomInterval.Width + IntervalUpdown.Width then
FCustomInterval.Width := w - IntervalUpdown.Width;
FCustomInterval.Left := RecurringType.Left + RecurringType.Width + 2*DELTA;
IntervalUpdown.Left := FCustomInterval.Left + FCustomInterval.Width;
IntervalLbl.Left := FCustomInterval.Left;
LocationEdit.Width := Bevel3.Left - LocationEdit.Left - DELTA;
if AlarmSet.Left + AlarmSet.Width + DELTA < StartDate.Left + StartDate.Width - AdvanceUpdown.Width - AlarmAdvance.Width then
begin
AdvanceUpdown.Left := StartDate.Left + StartDate.Width - AdvanceUpdown.Width;
AlarmAdvance.Left := AdvanceUpdown.Left - AlarmAdvance.Width;
end else begin
AlarmAdvance.Left := AlarmSet.Left + AlarmSet.Width + DELTA;
AdvanceUpdown.Left := AlarmAdvance.Left + AlarmAdvance.Width;
AlarmAdvancetype.Left := AdvanceUpdown.Left + AdvanceUpdown.Width + 2*DELTA;
end;
SoundFinderBtn.Left := AlarmAdvanceType.Left + AlarmAdvanceType.Width + 2;
RepeatUntil.Width := StartDate.Width;
// CustomInterval.Left := RepeatUntil.Left;
AlarmAdvance.Width := AdvanceUpDown.Left - 2 - AlarmAdvance.Left;
AlarmAdvanceType.Width := StartTime.Width;
Width := RightOf(IntervalUpdown) + DELTA + Width - AppointmentGroupbox.ClientWidth;
CategoryLbl.Left := Bevel3.Left + Bevel3.Width + DELTA;
Category.Left := CategoryLbl.Left + GetLabelWidth(CategoryLbl) + DELTA;
Category.Width := RightOf(DescriptionEdit) - Category.Left;
{
Category.Left := DescriptionEdit.Left + DescriptionEdit.Width - category.Width;
CategoryLbl.Left := Category.Left - DELTA - GetLabelWidth(CategoryLbl);
}
// *** Vertical positions ***
DescriptionEdit.Top := VDELTA;
DescriptionLbl.Top := DescriptionEdit.Top + (DescriptionEdit.Height - DescriptionLbl.Height) div 2;
LocationEdit.Top := BottomOf(DescriptionEdit) + VDIST;
LocationLbl.Top := LocationEdit.Top + (LocationEdit.Height - LocationLbl.Height) div 2;
CategoryLbl.Top := LocationLbl.Top;
Category.Top := LocationEdit.Top;
PanelDescription.ClientHeight := BottomOf(LocationEdit) + VDIST;
imgClock.Top := VDELTA;
CbAllDay.Top := imgClock.Top;
imgRecurring.Top := imgClock.Top;
StartDate.Top := BottomOf(CbAllDay) + VDIST;
StartTime.Top := StartDate.Top;
StartTimeLbl.Top := StartDate.Top + (StartDate.Height - StartTimeLbl.Height) div 2;
EndDate.Top := BottomOf(StartDate) + VDIST;
EndTime.Top := EndDate.Top;
EndTimeLbl.Top := EndDate.Top + (EndDate.Height - EndTimeLbl.Height) div 2;
RecurringType.Top := StartDate.Top;
edtUnusedPlaceHolder.Top := RecurringType.Top;
FCustomInterval.Top := RecurringType.Top;
IntervalUpDown.Top := FCustomInterval.Top;
RecurringLbl.Top := RecurringType.Top - 4 - RecurringLbl.Height;
IntervalLbl.Top := RecurringLbl.Top;
RepeatUntil.Top := EndDate.Top;
RecurrenceEndsLbl.Top := RepeatUntil.Top + (RepeatUntil.Height - RecurrenceEndsLbl.Height) div 2;
PanelTimes.ClientHeight := BottomOf(EndDate) + VDELTA;
Bevel3.Top := VDELTA;
Bevel3.Height := PanelTimes.ClientHeight - 2*VDELTA;
imgAlarm.Top := VDELTA;
AlarmAdvance.Top := imgAlarm.Top;
AdvanceUpdown.Top := AlarmAdvance.Top;
AlarmSet.Top := AlarmAdvance.Top + (AlarmAdvance.Height - AlarmSet.Height) div 2;
AlarmAdvanceType.Top := AlarmAdvance.Top;
SoundFinderBtn.Height := AlarmAdvanceType.Height;
SoundFinderBtn.Width := SoundFinderBtn.Height;
SoundFinderBtn.Top := AlarmAdvanceType.Top;
PanelAlarm.ClientHeight := Max(BottomOf(ImgAlarm), BottomOf(AlarmAdvance)) + VDIST;
OKBtn.Width := Max(GetButtonWidth(OKBtn), GetButtonWidth(CancelBtn));
CancelBtn.Width := OKBtn.Width;
{$IFDEF MSWINDOWS}
CancelBtn.Left := ButtonPanel.ClientWidth - ResourcenameLbl.Left - CancelBtn.Width;
OKBtn.Left := CancelBtn.Left - DELTA - OKBtn.Width;
OKBtn.TabOrder := 0;
CancelBtn.TabOrder := 1;
{$ELSE}
OKBtn.Left := ButtonPanel.ClientWidth - ResourcenameLbl.Left - OKBtn.Width;
CancelBtn.Left := OKBtn.Left - DELTA - CancelBtn.Width;
CancelBtn.TabOrder := 0;
OKBtn.TabOrder := 1;
{$ENDIF}
ResourceNameLbl.Font.Size := ScaleY(ResourceNameLbl.Font.Size, DesignTimeDPI);
ResourceNameLbl.Top := (ButtonPanel.ClientHeight - Panel1.BorderWidth - ResourceNameLbl.Height) div 2;
OKBtn.Top := (ButtonPanel.ClientHeight - Panel1.BorderWidth - OKBtn.Height) div 2;
CancelBtn.Top := OKBtn.Top;
OKBtn.Height := ScaleY(OKBtn.Height, DesigntimeDPI);
CancelBtn.Height := OKBtn.Height;
ButtonPanel.ClientHeight := OKBtn.Height + Bevel4.Height;
ResourceNameLbl.Top := OKBtn.Top + (OKBtn.Height - ResourceNameLbl.Height) div 2;
NotesMemo.Top := BottomOf(AppointmentGroupbox) + Bevel4.Height;
NotesMemo.Width := AppointmentGroupbox.Width;
NotesMemo.Left := AppointmentGroupbox.Left;
ClientHeight := AppointmentGroupbox.Height + Bevel4.Height + ScaleY(NotesMemo.Height, DesignTimeDPI) + ButtonPanel.Height;
AlignOKCancel(OKBtn, CancelBtn, ButtonPanel);
end;
@ -848,13 +702,13 @@ begin
end;
{=====}
function TVpEventEditDialog.AddNewEvent(StartTime, EndTime: TDateTime): Boolean;
function TVpEventEditDialog.AddNewEvent(PlaceholderStartTime, EndTimePlaceholder: TDateTime): Boolean;
begin
Result := false;
if DataStore <> nil then begin
ceEvent := DataStore.Resource.Schedule.AddEvent(
DataStore.GetNextID(EventsTableName),
StartTime, EndTime
PlaceholderStartTime, EndTimePlaceholder
);
if ceEvent <> nil then begin
Result := Execute(ceEvent);