mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-06-01 01:52:33 +02:00
AnchorEditor: commit keyboard changes. Issue #0020826
git-svn-id: trunk@35960 -
This commit is contained in:
parent
ff6d88d005
commit
a4e43e4501
@ -10,6 +10,7 @@ object AnchorDesigner: TAnchorDesigner
|
||||
Constraints.MinHeight = 282
|
||||
Constraints.MinWidth = 476
|
||||
OnCreate = AnchorDesignerCreate
|
||||
OnDeactivate = FormDeactivate
|
||||
OnDestroy = AnchorDesignerDestroy
|
||||
OnShow = AnchorDesignerShow
|
||||
LCLVersion = '0.9.31'
|
||||
@ -20,22 +21,22 @@ object AnchorDesigner: TAnchorDesigner
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideBottom.Control = BottomGroupBox
|
||||
Left = 193
|
||||
Height = 170
|
||||
Top = 59
|
||||
Height = 168
|
||||
Top = 60
|
||||
Width = 210
|
||||
Anchors = [akTop, akLeft, akBottom]
|
||||
BorderSpacing.Top = 4
|
||||
BorderSpacing.Bottom = 4
|
||||
Caption = 'BorderSpaceGroupBox'
|
||||
ClientHeight = 153
|
||||
ClientHeight = 150
|
||||
ClientWidth = 206
|
||||
TabOrder = 2
|
||||
object LeftBorderSpaceSpinEdit: TSpinEdit
|
||||
AnchorSideTop.Control = AroundBorderSpaceSpinEdit
|
||||
AnchorSideRight.Control = AroundBorderSpaceSpinEdit
|
||||
Left = 11
|
||||
Height = 19
|
||||
Top = 67
|
||||
Height = 23
|
||||
Top = 64
|
||||
Width = 56
|
||||
Anchors = [akTop, akRight]
|
||||
BorderSpacing.Right = 8
|
||||
@ -51,8 +52,8 @@ object AnchorDesigner: TAnchorDesigner
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = AroundBorderSpaceSpinEdit
|
||||
Left = 139
|
||||
Height = 19
|
||||
Top = 67
|
||||
Height = 23
|
||||
Top = 64
|
||||
Width = 56
|
||||
BorderSpacing.Left = 8
|
||||
MaxValue = 2048
|
||||
@ -66,8 +67,8 @@ object AnchorDesigner: TAnchorDesigner
|
||||
AnchorSideLeft.Control = AroundBorderSpaceSpinEdit
|
||||
AnchorSideBottom.Control = AroundBorderSpaceSpinEdit
|
||||
Left = 75
|
||||
Height = 19
|
||||
Top = 36
|
||||
Height = 23
|
||||
Top = 29
|
||||
Width = 56
|
||||
Anchors = [akLeft, akBottom]
|
||||
BorderSpacing.Bottom = 12
|
||||
@ -83,8 +84,8 @@ object AnchorDesigner: TAnchorDesigner
|
||||
AnchorSideTop.Control = AroundBorderSpaceSpinEdit
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 75
|
||||
Height = 19
|
||||
Top = 98
|
||||
Height = 23
|
||||
Top = 99
|
||||
Width = 56
|
||||
BorderSpacing.Top = 12
|
||||
MaxValue = 2048
|
||||
@ -100,8 +101,8 @@ object AnchorDesigner: TAnchorDesigner
|
||||
AnchorSideTop.Control = BorderSpaceGroupBox
|
||||
AnchorSideTop.Side = asrCenter
|
||||
Left = 75
|
||||
Height = 19
|
||||
Top = 67
|
||||
Height = 23
|
||||
Top = 64
|
||||
Width = 56
|
||||
MaxValue = 2048
|
||||
OnChange = BorderSpaceSpinEditChange
|
||||
@ -113,7 +114,7 @@ object AnchorDesigner: TAnchorDesigner
|
||||
end
|
||||
object TopGroupBox: TGroupBox
|
||||
Left = 56
|
||||
Height = 55
|
||||
Height = 56
|
||||
Top = 0
|
||||
Width = 484
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
@ -180,10 +181,10 @@ object AnchorDesigner: TAnchorDesigner
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = TopRefCenterSpeedButton
|
||||
AnchorSideTop.Side = asrCenter
|
||||
Left = 93
|
||||
Height = 14
|
||||
Top = 8
|
||||
Width = 39
|
||||
Left = 86
|
||||
Height = 16
|
||||
Top = 7
|
||||
Width = 37
|
||||
BorderSpacing.Left = 16
|
||||
Caption = 'Sibling'
|
||||
ParentColor = False
|
||||
@ -192,9 +193,9 @@ object AnchorDesigner: TAnchorDesigner
|
||||
AnchorSideTop.Control = TopRefCenterSpeedButton
|
||||
AnchorSideTop.Side = asrCenter
|
||||
Left = 8
|
||||
Height = 18
|
||||
Height = 19
|
||||
Top = 6
|
||||
Width = 69
|
||||
Width = 62
|
||||
BorderSpacing.Left = 8
|
||||
Caption = 'Enabled'
|
||||
OnChange = AnchorEnabledCheckBoxChange
|
||||
@ -206,14 +207,14 @@ object AnchorDesigner: TAnchorDesigner
|
||||
AnchorSideTop.Control = TopRefCenterSpeedButton
|
||||
AnchorSideTop.Side = asrCenter
|
||||
AnchorSideRight.Control = TopRefTopSpeedButton
|
||||
Left = 136
|
||||
Height = 20
|
||||
Top = 5
|
||||
Width = 226
|
||||
Left = 127
|
||||
Height = 23
|
||||
Top = 4
|
||||
Width = 235
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
BorderSpacing.Left = 4
|
||||
BorderSpacing.Right = 12
|
||||
ItemHeight = 0
|
||||
ItemHeight = 15
|
||||
OnEditingDone = SiblingComboBoxChange
|
||||
ParentShowHint = False
|
||||
ShowHint = True
|
||||
@ -223,8 +224,8 @@ object AnchorDesigner: TAnchorDesigner
|
||||
end
|
||||
object BottomGroupBox: TGroupBox
|
||||
Left = 56
|
||||
Height = 55
|
||||
Top = 233
|
||||
Height = 56
|
||||
Top = 232
|
||||
Width = 484
|
||||
Anchors = [akLeft, akRight, akBottom]
|
||||
AutoSize = True
|
||||
@ -288,10 +289,10 @@ object AnchorDesigner: TAnchorDesigner
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = BottomRefCenterSpeedButton
|
||||
AnchorSideTop.Side = asrCenter
|
||||
Left = 93
|
||||
Height = 14
|
||||
Top = 8
|
||||
Width = 39
|
||||
Left = 86
|
||||
Height = 16
|
||||
Top = 7
|
||||
Width = 37
|
||||
BorderSpacing.Left = 16
|
||||
Caption = 'Sibling'
|
||||
ParentColor = False
|
||||
@ -300,9 +301,9 @@ object AnchorDesigner: TAnchorDesigner
|
||||
AnchorSideTop.Control = BottomRefCenterSpeedButton
|
||||
AnchorSideTop.Side = asrCenter
|
||||
Left = 8
|
||||
Height = 18
|
||||
Height = 19
|
||||
Top = 6
|
||||
Width = 69
|
||||
Width = 62
|
||||
BorderSpacing.Left = 8
|
||||
Caption = 'Enabled'
|
||||
OnChange = AnchorEnabledCheckBoxChange
|
||||
@ -314,14 +315,14 @@ object AnchorDesigner: TAnchorDesigner
|
||||
AnchorSideTop.Control = BottomRefCenterSpeedButton
|
||||
AnchorSideTop.Side = asrCenter
|
||||
AnchorSideRight.Control = BottomRefTopSpeedButton
|
||||
Left = 136
|
||||
Height = 20
|
||||
Top = 5
|
||||
Width = 226
|
||||
Left = 127
|
||||
Height = 23
|
||||
Top = 4
|
||||
Width = 235
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
BorderSpacing.Left = 4
|
||||
BorderSpacing.Right = 12
|
||||
ItemHeight = 0
|
||||
ItemHeight = 15
|
||||
OnEditingDone = SiblingComboBoxChange
|
||||
ParentShowHint = False
|
||||
ShowHint = True
|
||||
@ -336,13 +337,13 @@ object AnchorDesigner: TAnchorDesigner
|
||||
AnchorSideBottom.Control = BorderSpaceGroupBox
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 407
|
||||
Height = 170
|
||||
Top = 59
|
||||
Height = 168
|
||||
Top = 60
|
||||
Width = 179
|
||||
Anchors = [akTop, akLeft, akRight, akBottom]
|
||||
BorderSpacing.Left = 4
|
||||
Caption = 'RightGroupBox'
|
||||
ClientHeight = 153
|
||||
ClientHeight = 150
|
||||
ClientWidth = 175
|
||||
TabOrder = 3
|
||||
object RightRefLeftSpeedButton: TSpeedButton
|
||||
@ -350,7 +351,7 @@ object AnchorDesigner: TAnchorDesigner
|
||||
AnchorSideRight.Control = RightRefRightSpeedButton
|
||||
Left = 69
|
||||
Height = 30
|
||||
Top = 98
|
||||
Top = 99
|
||||
Width = 30
|
||||
Anchors = [akTop, akRight]
|
||||
BorderSpacing.Right = 4
|
||||
@ -366,7 +367,7 @@ object AnchorDesigner: TAnchorDesigner
|
||||
AnchorSideRight.Control = RightRefCenterSpeedButton
|
||||
Left = 103
|
||||
Height = 30
|
||||
Top = 98
|
||||
Top = 99
|
||||
Width = 30
|
||||
Anchors = [akTop, akRight]
|
||||
BorderSpacing.Right = 4
|
||||
@ -384,7 +385,7 @@ object AnchorDesigner: TAnchorDesigner
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 137
|
||||
Height = 30
|
||||
Top = 98
|
||||
Top = 99
|
||||
Width = 30
|
||||
Anchors = [akTop, akRight]
|
||||
BorderSpacing.Top = 12
|
||||
@ -400,9 +401,9 @@ object AnchorDesigner: TAnchorDesigner
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideBottom.Control = RightSiblingComboBox
|
||||
Left = 8
|
||||
Height = 14
|
||||
Top = 52
|
||||
Width = 39
|
||||
Height = 16
|
||||
Top = 48
|
||||
Width = 37
|
||||
Anchors = [akLeft, akBottom]
|
||||
BorderSpacing.Top = 2
|
||||
Caption = 'Sibling'
|
||||
@ -413,9 +414,9 @@ object AnchorDesigner: TAnchorDesigner
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideBottom.Control = RightSiblingLabel
|
||||
Left = 8
|
||||
Height = 18
|
||||
Top = 26
|
||||
Width = 69
|
||||
Height = 19
|
||||
Top = 21
|
||||
Width = 62
|
||||
Anchors = [akLeft, akBottom]
|
||||
BorderSpacing.Bottom = 8
|
||||
Caption = 'Enabled'
|
||||
@ -429,13 +430,13 @@ object AnchorDesigner: TAnchorDesigner
|
||||
AnchorSideRight.Control = RightGroupBox
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 8
|
||||
Height = 20
|
||||
Top = 66
|
||||
Height = 23
|
||||
Top = 64
|
||||
Width = 159
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
BorderSpacing.Left = 8
|
||||
BorderSpacing.Right = 8
|
||||
ItemHeight = 0
|
||||
ItemHeight = 15
|
||||
OnEditingDone = SiblingComboBoxChange
|
||||
ParentShowHint = False
|
||||
ShowHint = True
|
||||
@ -449,13 +450,13 @@ object AnchorDesigner: TAnchorDesigner
|
||||
AnchorSideBottom.Control = BorderSpaceGroupBox
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 8
|
||||
Height = 170
|
||||
Top = 59
|
||||
Height = 168
|
||||
Top = 60
|
||||
Width = 181
|
||||
Anchors = [akTop, akLeft, akRight, akBottom]
|
||||
BorderSpacing.Right = 4
|
||||
Caption = 'LeftGroupBox'
|
||||
ClientHeight = 153
|
||||
ClientHeight = 150
|
||||
ClientWidth = 177
|
||||
TabOrder = 1
|
||||
object LeftRefLeftSpeedButton: TSpeedButton
|
||||
@ -463,7 +464,7 @@ object AnchorDesigner: TAnchorDesigner
|
||||
AnchorSideRight.Control = LeftRefRightSpeedButton
|
||||
Left = 71
|
||||
Height = 30
|
||||
Top = 98
|
||||
Top = 99
|
||||
Width = 30
|
||||
Anchors = [akTop, akRight]
|
||||
BorderSpacing.Right = 4
|
||||
@ -480,7 +481,7 @@ object AnchorDesigner: TAnchorDesigner
|
||||
AnchorSideRight.Control = LeftRefCenterSpeedButton
|
||||
Left = 105
|
||||
Height = 30
|
||||
Top = 98
|
||||
Top = 99
|
||||
Width = 30
|
||||
Anchors = [akTop, akRight]
|
||||
BorderSpacing.Right = 4
|
||||
@ -499,7 +500,7 @@ object AnchorDesigner: TAnchorDesigner
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 139
|
||||
Height = 30
|
||||
Top = 98
|
||||
Top = 99
|
||||
Width = 30
|
||||
Anchors = [akTop, akRight]
|
||||
BorderSpacing.Top = 12
|
||||
@ -514,9 +515,9 @@ object AnchorDesigner: TAnchorDesigner
|
||||
AnchorSideLeft.Control = LeftSiblingComboBox
|
||||
AnchorSideBottom.Control = LeftSiblingComboBox
|
||||
Left = 8
|
||||
Height = 14
|
||||
Top = 52
|
||||
Width = 39
|
||||
Height = 16
|
||||
Top = 48
|
||||
Width = 37
|
||||
Anchors = [akLeft, akBottom]
|
||||
BorderSpacing.Top = 2
|
||||
Caption = 'Sibling'
|
||||
@ -526,9 +527,9 @@ object AnchorDesigner: TAnchorDesigner
|
||||
AnchorSideLeft.Control = LeftSiblingComboBox
|
||||
AnchorSideBottom.Control = LeftSiblingLabel
|
||||
Left = 8
|
||||
Height = 18
|
||||
Top = 26
|
||||
Width = 69
|
||||
Height = 19
|
||||
Top = 21
|
||||
Width = 62
|
||||
Anchors = [akLeft, akBottom]
|
||||
BorderSpacing.Bottom = 8
|
||||
Caption = 'Enabled'
|
||||
@ -542,13 +543,13 @@ object AnchorDesigner: TAnchorDesigner
|
||||
AnchorSideRight.Control = LeftGroupBox
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 8
|
||||
Height = 20
|
||||
Top = 66
|
||||
Height = 23
|
||||
Top = 64
|
||||
Width = 161
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
BorderSpacing.Left = 8
|
||||
BorderSpacing.Right = 8
|
||||
ItemHeight = 0
|
||||
ItemHeight = 15
|
||||
OnEditingDone = SiblingComboBoxChange
|
||||
ParentShowHint = False
|
||||
ShowHint = True
|
||||
|
@ -136,6 +136,7 @@ type
|
||||
procedure AnchorDesignerShow(Sender: TObject);
|
||||
procedure AnchorEnabledCheckBoxChange(Sender: TObject);
|
||||
procedure BorderSpaceSpinEditChange(Sender: TObject);
|
||||
procedure FormDeactivate(Sender: TObject);
|
||||
procedure SiblingComboBoxChange(Sender: TObject);
|
||||
procedure ReferenceSideButtonClicked(Sender: TObject);
|
||||
private
|
||||
@ -390,6 +391,13 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TAnchorDesigner.FormDeactivate(Sender: TObject);
|
||||
begin
|
||||
// commit changes made by keyboard
|
||||
if (ActiveControl is TComboBox) then
|
||||
SiblingComboBoxChange(ActiveControl);
|
||||
end;
|
||||
|
||||
function compareControlTop(Item1, Item2: pointer): Integer;
|
||||
begin
|
||||
if tcontrol(item1).top<tcontrol(item2).top then result:=-1
|
||||
|
Loading…
Reference in New Issue
Block a user