jvcllaz: ReadOnly support in TJvYearGrid. YearGridEditForm contains a color box for color selection. Extended YearGrid demo.

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@8374 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2022-08-09 17:32:52 +00:00
parent 814cf93414
commit 5ae03788b6
7 changed files with 220 additions and 68 deletions

View File

@ -1,15 +1,14 @@
object MainForm: TMainForm
Left = 361
Height = 546
Height = 399
Top = 215
Width = 1310
Width = 911
AutoSize = True
Caption = 'JvYearGrid Demo'
ClientHeight = 546
ClientWidth = 1310
ClientHeight = 399
ClientWidth = 911
OnActivate = FormActivate
OnCreate = FormCreate
LCLVersion = '2.1.0.0'
object JvYearGrid1: TJvYearGrid
AnchorSideLeft.Control = Owner
AnchorSideTop.Control = Owner
@ -98,14 +97,14 @@ object MainForm: TMainForm
AnchorSideTop.Control = JvYearGrid1
AnchorSideTop.Side = asrBottom
Left = 0
Height = 89
Height = 119
Top = 264
Width = 905
Width = 911
AutoSize = True
BorderSpacing.Bottom = 16
BevelOuter = bvNone
ClientHeight = 89
ClientWidth = 905
ClientHeight = 119
ClientWidth = 911
ParentFont = False
TabOrder = 1
object edLeftMargin: TSpinEdit
@ -190,6 +189,7 @@ object MainForm: TMainForm
Width = 156
Anchors = [akTop, akRight]
Caption = 'Day names alignment/format'
Color = clDefault
ParentColor = False
ParentFont = False
end
@ -206,6 +206,7 @@ object MainForm: TMainForm
Width = 172
BorderSpacing.Left = 32
Caption = 'Month names alignment/format'
Color = clDefault
ParentColor = False
ParentFont = False
end
@ -243,6 +244,7 @@ object MainForm: TMainForm
Width = 82
Anchors = [akTop, akRight]
Caption = 'Days alignment'
Color = clDefault
ParentColor = False
ParentFont = False
end
@ -276,7 +278,7 @@ object MainForm: TMainForm
Left = 506
Height = 19
Top = 56
Width = 39
Width = 37
BorderSpacing.Right = 16
Caption = 'Flat'
OnChange = cmbFlatChange
@ -290,7 +292,7 @@ object MainForm: TMainForm
Left = 506
Height = 23
Top = 0
Width = 100
Width = 106
BorderSpacing.Left = 8
ItemHeight = 15
Items.Strings = (
@ -310,7 +312,7 @@ object MainForm: TMainForm
Left = 506
Height = 23
Top = 27
Width = 100
Width = 106
BorderSpacing.Left = 8
ItemHeight = 15
Items.Strings = (
@ -328,7 +330,7 @@ object MainForm: TMainForm
AnchorSideTop.Control = cmbDayFormat
AnchorSideBottom.Control = cmbDayFormat
AnchorSideBottom.Side = asrBottom
Left = 657
Left = 663
Height = 23
Top = 0
Width = 57
@ -346,12 +348,13 @@ object MainForm: TMainForm
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = cmbDayFormat
AnchorSideTop.Side = asrCenter
Left = 632
Left = 638
Height = 15
Top = 4
Width = 22
BorderSpacing.Left = 26
Caption = 'Year'
Color = clDefault
ParentColor = False
ParentFont = False
end
@ -365,6 +368,7 @@ object MainForm: TMainForm
Width = 66
BorderSpacing.Left = 8
Caption = 'Cell margins'
Color = clDefault
ParentColor = False
end
object btnFont: TButton
@ -373,7 +377,7 @@ object MainForm: TMainForm
AnchorSideTop.Side = asrCenter
AnchorSideRight.Control = udYear
AnchorSideRight.Side = asrBottom
Left = 632
Left = 638
Height = 25
Top = 53
Width = 82
@ -387,8 +391,8 @@ object MainForm: TMainForm
AnchorSideLeft.Control = udYear
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = edTopMargin
Left = 730
Height = 89
Left = 736
Height = 81
Top = 0
Width = 167
AutoFill = True
@ -397,14 +401,15 @@ object MainForm: TMainForm
BorderSpacing.Right = 8
Caption = 'Auto size'
ChildSizing.LeftRightSpacing = 6
ChildSizing.TopBottomSpacing = 6
ChildSizing.TopBottomSpacing = 2
ChildSizing.HorizontalSpacing = 4
ChildSizing.EnlargeHorizontal = crsHomogenousChildResize
ChildSizing.EnlargeVertical = crsHomogenousChildResize
ChildSizing.ShrinkHorizontal = crsScaleChilds
ChildSizing.ShrinkVertical = crsScaleChilds
ChildSizing.Layout = cclLeftToRightThenTopToBottom
ChildSizing.ControlsPerLine = 2
ClientHeight = 69
ClientHeight = 61
ClientWidth = 163
Columns = 2
Items.Strings = (
@ -424,21 +429,57 @@ object MainForm: TMainForm
AnchorSideTop.Control = rgAutoSize
AnchorSideRight.Control = rgAutoSize
AnchorSideRight.Side = asrBottom
Left = 877
Height = 19
Left = 885
Height = 17
Top = 0
Width = 20
Width = 18
Anchors = [akTop, akRight]
Checked = True
OnChange = cmbAutoSizeChange
State = cbChecked
TabOrder = 13
end
object cbReadOnly: TCheckBox
AnchorSideLeft.Control = cmbFlat
AnchorSideTop.Control = cmbFlat
AnchorSideTop.Side = asrBottom
Left = 506
Height = 19
Top = 75
Width = 72
Caption = 'Read-only'
TabOrder = 14
end
object btnSaveYear: TButton
AnchorSideLeft.Control = Label2
AnchorSideTop.Control = cbReadOnly
AnchorSideTop.Side = asrBottom
Left = 218
Height = 25
Top = 94
Width = 75
Caption = 'Save year'
OnClick = btnSaveYearClick
TabOrder = 15
end
object btnLoadYear: TButton
AnchorSideLeft.Control = btnSaveYear
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = btnSaveYear
Left = 299
Height = 25
Top = 94
Width = 75
BorderSpacing.Left = 6
Caption = 'Load year'
OnClick = btnLoadYearClick
TabOrder = 16
end
end
object FontDialog1: TFontDialog
MinFontSize = 0
MaxFontSize = 0
left = 568
top = 320
Left = 688
Top = 296
end
end