designer (size component dialog):

- fix memory leak
- reanchor dialog buttons

git-svn-id: trunk@13074 -
This commit is contained in:
paul 2007-11-29 08:53:53 +00:00
parent 3c7a01e5e9
commit 594e79a01d
3 changed files with 124 additions and 74 deletions

View File

@ -1,100 +1,126 @@
object SizeComponentsDialog: TSizeComponentsDialog
Left = 379
Height = 190
Top = 745
Width = 380
HorzScrollBar.Page = 379
VertScrollBar.Page = 189
ActiveControl = OKButton
BorderStyle = bsSizeToolWin
Caption = 'SizeComponentsDialog'
ClientHeight = 190
ClientWidth = 380
OnClose = FormClose
OnResize = FormResize
PixelsPerInch = 96
Position = poScreenCenter
HorzScrollBar.Page = 379
VertScrollBar.Page = 189
Left = 379
Height = 190
Top = 779
Width = 380
object OKButton: TBitBtn
AnchorSideRight.Control = CancelButton
AnchorSideBottom.Control = Owner
AnchorSideBottom.Side = asrBottom
Left = 230
Height = 26
Top = 158
Width = 60
Anchors = [akRight, akBottom]
AutoSize = True
BorderSpacing.Right = 6
BorderSpacing.Bottom = 6
Caption = '&OK'
Default = True
Kind = bkOK
ModalResult = 1
NumGlyphs = 0
TabOrder = 0
AnchorSideBottom.Control = Owner
AnchorSideBottom.Side = asrBottom
Left = 306
Height = 34
Top = 150
Width = 68
end
object CancelButton: TBitBtn
AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom
AnchorSideBottom.Control = Owner
AnchorSideBottom.Side = asrBottom
Left = 296
Height = 26
Top = 158
Width = 78
Anchors = [akRight, akBottom]
AutoSize = True
BorderSpacing.Right = 6
BorderSpacing.Bottom = 6
Caption = 'Cancel'
Kind = bkCancel
ModalResult = 2
NumGlyphs = 0
TabOrder = 1
AnchorSideRight.Control = OKButton
Left = 220
Height = 34
Top = 150
Width = 80
end
object WidthRadioGroup: TRadioGroup
Anchors = [akTop, akLeft, akBottom]
BorderSpacing.Left = 6
Caption = 'WidthRadioGroup'
TabOrder = 2
AnchorSideLeft.Control = Owner
AnchorSideBottom.Control = HeightRadioGroup
AnchorSideBottom.Side = asrBottom
Left = 6
Height = 138
Height = 146
Top = 6
Width = 181
Anchors = [akTop, akLeft, akBottom]
AutoFill = True
BorderSpacing.Left = 6
Caption = 'WidthRadioGroup'
ChildSizing.LeftRightSpacing = 6
ChildSizing.TopBottomSpacing = 6
ChildSizing.EnlargeHorizontal = crsHomogenousChildResize
ChildSizing.EnlargeVertical = crsHomogenousChildResize
ChildSizing.ShrinkHorizontal = crsScaleChilds
ChildSizing.ShrinkVertical = crsScaleChilds
ChildSizing.Layout = cclLeftToRightThenTopToBottom
ChildSizing.ControlsPerLine = 1
ClientHeight = 128
ClientWidth = 177
TabOrder = 2
object WidthEdit: TEdit
AnchorSideBottom.Control = WidthRadioGroup
AnchorSideBottom.Side = asrBottom
Left = 86
Height = 23
Top = 99
Width = 80
Anchors = [akRight, akBottom]
BorderSpacing.Around = 6
TabOrder = 0
Text = 'WidthEdit'
AnchorSideBottom.Control = WidthRadioGroup
AnchorSideBottom.Side = asrBottom
Left = 90
Height = 23
Top = 91
Width = 80
end
end
object HeightRadioGroup: TRadioGroup
Anchors = [akTop, akLeft, akRight, akBottom]
BorderSpacing.Around = 6
Caption = 'HeightRadioGroup'
TabOrder = 3
AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom
AnchorSideBottom.Control = OKButton
Left = 193
Height = 138
Height = 146
Top = 6
Width = 181
Anchors = [akTop, akLeft, akRight, akBottom]
AutoFill = True
BorderSpacing.Around = 6
Caption = 'HeightRadioGroup'
ChildSizing.LeftRightSpacing = 6
ChildSizing.TopBottomSpacing = 6
ChildSizing.EnlargeHorizontal = crsHomogenousChildResize
ChildSizing.EnlargeVertical = crsHomogenousChildResize
ChildSizing.ShrinkHorizontal = crsScaleChilds
ChildSizing.ShrinkVertical = crsScaleChilds
ChildSizing.Layout = cclLeftToRightThenTopToBottom
ChildSizing.ControlsPerLine = 1
ClientHeight = 128
ClientWidth = 177
TabOrder = 3
object HeightEdit: TEdit
AnchorSideBottom.Control = HeightRadioGroup
AnchorSideBottom.Side = asrBottom
Left = 87
Height = 23
Top = 99
Width = 80
Anchors = [akRight, akBottom]
BorderSpacing.Around = 6
TabOrder = 0
Text = 'HeightEdit'
AnchorSideBottom.Control = HeightRadioGroup
AnchorSideBottom.Side = asrBottom
Left = 91
Height = 23
Top = 91
Width = 80
end
end
end

View File

@ -1,34 +1,51 @@
{ Ýòî - ôàéë ðåñóðñîâ, àâòîìàòè÷åñêè ñîçäàííûé lazarus }
LazarusResources.Add('TSizeComponentsDialog','FORMDATA',[
'TPF0'#21'TSizeComponentsDialog'#20'SizeComponentsDialog'#13'ActiveControl'#7
+#8'OKButton'#11'BorderStyle'#7#13'bsSizeToolWin'#7'Caption'#6#20'SizeCompone'
+'ntsDialog'#12'ClientHeight'#3#190#0#11'ClientWidth'#3'|'#1#8'OnResize'#7#10
+'FormResize'#13'PixelsPerInch'#2'`'#8'Position'#7#14'poScreenCenter'#18'Horz'
+'ScrollBar.Page'#3'{'#1#18'VertScrollBar.Page'#3#189#0#4'Left'#3'{'#1#6'Heig'
+'ht'#3#190#0#3'Top'#3#11#3#5'Width'#3'|'#1#0#7'TBitBtn'#8'OKButton'#7'Anchor'
+'s'#11#7'akRight'#8'akBottom'#0#8'AutoSize'#9#20'BorderSpacing.Bottom'#2#6#7
+'Caption'#6#3'&OK'#7'Default'#9#4'Kind'#7#4'bkOK'#11'ModalResult'#2#1#9'NumG'
+'lyphs'#2#0#8'TabOrder'#2#0#24'AnchorSideBottom.Control'#7#5'Owner'#21'Ancho'
+'rSideBottom.Side'#7#9'asrBottom'#4'Left'#3'2'#1#6'Height'#2'"'#3'Top'#3#150
+#0#5'Width'#2'D'#0#0#7'TBitBtn'#12'CancelButton'#7'Anchors'#11#7'akRight'#8
+'akBottom'#0#8'AutoSize'#9#19'BorderSpacing.Right'#2#6#7'Caption'#6#6'Cancel'
+#4'Kind'#7#8'bkCancel'#11'ModalResult'#2#2#9'NumGlyphs'#2#0#8'TabOrder'#2#1
+#23'AnchorSideRight.Control'#7#8'OKButton'#4'Left'#3#220#0#6'Height'#2'"'#3
+'Top'#3#150#0#5'Width'#2'P'#0#0#11'TRadioGroup'#15'WidthRadioGroup'#7'Anchor'
+'s'#11#5'akTop'#6'akLeft'#8'akBottom'#0#18'BorderSpacing.Left'#2#6#7'Caption'
+#6#15'WidthRadioGroup'#8'TabOrder'#2#2#22'AnchorSideLeft.Control'#7#5'Owner'
+#24'AnchorSideBottom.Control'#7#16'HeightRadioGroup'#21'AnchorSideBottom.Sid'
+'e'#7#9'asrBottom'#4'Left'#2#6#6'Height'#3#138#0#3'Top'#2#6#5'Width'#3#181#0
+#0#5'TEdit'#9'WidthEdit'#7'Anchors'#11#7'akRight'#8'akBottom'#0#20'BorderSpa'
+'cing.Around'#2#6#8'TabOrder'#2#0#4'Text'#6#9'WidthEdit'#24'AnchorSideBottom'
+'.Control'#7#15'WidthRadioGroup'#21'AnchorSideBottom.Side'#7#9'asrBottom'#4
+'Left'#2'Z'#6'Height'#2#23#3'Top'#2'['#5'Width'#2'P'#0#0#0#11'TRadioGroup'#16
+'HeightRadioGroup'#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#8'akBottom'#0
+#20'BorderSpacing.Around'#2#6#7'Caption'#6#16'HeightRadioGroup'#8'TabOrder'#2
+#3#23'AnchorSideRight.Control'#7#5'Owner'#20'AnchorSideRight.Side'#7#9'asrBo'
+'ttom'#24'AnchorSideBottom.Control'#7#8'OKButton'#4'Left'#3#193#0#6'Height'#3
+#138#0#3'Top'#2#6#5'Width'#3#181#0#0#5'TEdit'#10'HeightEdit'#7'Anchors'#11#7
+'akRight'#8'akBottom'#0#20'BorderSpacing.Around'#2#6#8'TabOrder'#2#0#4'Text'
+#6#10'HeightEdit'#24'AnchorSideBottom.Control'#7#16'HeightRadioGroup'#21'Anc'
+'horSideBottom.Side'#7#9'asrBottom'#4'Left'#2'['#6'Height'#2#23#3'Top'#2'['#5
+'Width'#2'P'#0#0#0#0
'TPF0'#21'TSizeComponentsDialog'#20'SizeComponentsDialog'#4'Left'#3'{'#1#6'He'
+'ight'#3#190#0#3'Top'#3#233#2#5'Width'#3'|'#1#18'HorzScrollBar.Page'#3'{'#1
+#18'VertScrollBar.Page'#3#189#0#13'ActiveControl'#7#8'OKButton'#11'BorderSty'
+'le'#7#13'bsSizeToolWin'#7'Caption'#6#20'SizeComponentsDialog'#12'ClientHeig'
+'ht'#3#190#0#11'ClientWidth'#3'|'#1#7'OnClose'#7#9'FormClose'#8'OnResize'#7
+#10'FormResize'#8'Position'#7#14'poScreenCenter'#0#7'TBitBtn'#8'OKButton'#23
+'AnchorSideRight.Control'#7#12'CancelButton'#24'AnchorSideBottom.Control'#7#5
+'Owner'#21'AnchorSideBottom.Side'#7#9'asrBottom'#4'Left'#3#230#0#6'Height'#2
+#26#3'Top'#3#158#0#5'Width'#2'<'#7'Anchors'#11#7'akRight'#8'akBottom'#0#8'Au'
+'toSize'#9#19'BorderSpacing.Right'#2#6#20'BorderSpacing.Bottom'#2#6#7'Captio'
+'n'#6#3'&OK'#7'Default'#9#4'Kind'#7#4'bkOK'#11'ModalResult'#2#1#9'NumGlyphs'
+#2#0#8'TabOrder'#2#0#0#0#7'TBitBtn'#12'CancelButton'#23'AnchorSideRight.Cont'
+'rol'#7#5'Owner'#20'AnchorSideRight.Side'#7#9'asrBottom'#24'AnchorSideBottom'
+'.Control'#7#5'Owner'#21'AnchorSideBottom.Side'#7#9'asrBottom'#4'Left'#3'('#1
+#6'Height'#2#26#3'Top'#3#158#0#5'Width'#2'N'#7'Anchors'#11#7'akRight'#8'akBo'
+'ttom'#0#8'AutoSize'#9#19'BorderSpacing.Right'#2#6#20'BorderSpacing.Bottom'#2
+#6#7'Caption'#6#6'Cancel'#4'Kind'#7#8'bkCancel'#11'ModalResult'#2#2#9'NumGly'
+'phs'#2#0#8'TabOrder'#2#1#0#0#11'TRadioGroup'#15'WidthRadioGroup'#22'AnchorS'
+'ideLeft.Control'#7#5'Owner'#24'AnchorSideBottom.Control'#7#16'HeightRadioGr'
+'oup'#21'AnchorSideBottom.Side'#7#9'asrBottom'#4'Left'#2#6#6'Height'#3#146#0
+#3'Top'#2#6#5'Width'#3#181#0#7'Anchors'#11#5'akTop'#6'akLeft'#8'akBottom'#0#8
+'AutoFill'#9#18'BorderSpacing.Left'#2#6#7'Caption'#6#15'WidthRadioGroup'#28
+'ChildSizing.LeftRightSpacing'#2#6#28'ChildSizing.TopBottomSpacing'#2#6#29'C'
+'hildSizing.EnlargeHorizontal'#7#24'crsHomogenousChildResize'#27'ChildSizing'
+'.EnlargeVertical'#7#24'crsHomogenousChildResize'#28'ChildSizing.ShrinkHoriz'
+'ontal'#7#14'crsScaleChilds'#26'ChildSizing.ShrinkVertical'#7#14'crsScaleChi'
+'lds'#18'ChildSizing.Layout'#7#29'cclLeftToRightThenTopToBottom'#27'ChildSiz'
+'ing.ControlsPerLine'#2#1#12'ClientHeight'#3#128#0#11'ClientWidth'#3#177#0#8
+'TabOrder'#2#2#0#5'TEdit'#9'WidthEdit'#24'AnchorSideBottom.Control'#7#15'Wid'
+'thRadioGroup'#21'AnchorSideBottom.Side'#7#9'asrBottom'#4'Left'#2'V'#6'Heigh'
+'t'#2#23#3'Top'#2'c'#5'Width'#2'P'#7'Anchors'#11#7'akRight'#8'akBottom'#0#20
+'BorderSpacing.Around'#2#6#8'TabOrder'#2#0#4'Text'#6#9'WidthEdit'#0#0#0#11'T'
+'RadioGroup'#16'HeightRadioGroup'#23'AnchorSideRight.Control'#7#5'Owner'#20
+'AnchorSideRight.Side'#7#9'asrBottom'#24'AnchorSideBottom.Control'#7#8'OKBut'
+'ton'#4'Left'#3#193#0#6'Height'#3#146#0#3'Top'#2#6#5'Width'#3#181#0#7'Anchor'
+'s'#11#5'akTop'#6'akLeft'#7'akRight'#8'akBottom'#0#8'AutoFill'#9#20'BorderSp'
+'acing.Around'#2#6#7'Caption'#6#16'HeightRadioGroup'#28'ChildSizing.LeftRigh'
+'tSpacing'#2#6#28'ChildSizing.TopBottomSpacing'#2#6#29'ChildSizing.EnlargeHo'
+'rizontal'#7#24'crsHomogenousChildResize'#27'ChildSizing.EnlargeVertical'#7
+#24'crsHomogenousChildResize'#28'ChildSizing.ShrinkHorizontal'#7#14'crsScale'
+'Childs'#26'ChildSizing.ShrinkVertical'#7#14'crsScaleChilds'#18'ChildSizing.'
+'Layout'#7#29'cclLeftToRightThenTopToBottom'#27'ChildSizing.ControlsPerLine'
+#2#1#12'ClientHeight'#3#128#0#11'ClientWidth'#3#177#0#8'TabOrder'#2#3#0#5'TE'
+'dit'#10'HeightEdit'#24'AnchorSideBottom.Control'#7#16'HeightRadioGroup'#21
+'AnchorSideBottom.Side'#7#9'asrBottom'#4'Left'#2'W'#6'Height'#2#23#3'Top'#2
+'c'#5'Width'#2'P'#7'Anchors'#11#7'akRight'#8'akBottom'#0#20'BorderSpacing.Ar'
+'ound'#2#6#8'TabOrder'#2#0#4'Text'#6#10'HeightEdit'#0#0#0#0
]);

View File

@ -42,6 +42,7 @@ type
HeightRadioGroup: TRadioGroup;
WidthEdit: TEdit;
HeightEdit: TEdit;
procedure FormClose(Sender: TObject; var CloseAction: TCloseAction);
procedure FormResize(Sender: TObject);
public
constructor Create(AOwner: TComponent); override;
@ -75,6 +76,12 @@ begin
HeightRadioGroup.Width := ClientWidth div 2 - 9;
end;
procedure TSizeComponentsDialog.FormClose(Sender: TObject;
var CloseAction: TCloseAction);
begin
CloseAction := caFree;
end;
constructor TSizeComponentsDialog.Create(AOwner: TComponent);
begin
inherited Create(AOwner);