mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-11-27 12:37:26 +01:00
converted SizeCompsDlg to lfm from Darius
git-svn-id: trunk@8486 -
This commit is contained in:
parent
fd511efafd
commit
7f4588879f
2
.gitattributes
vendored
2
.gitattributes
vendored
@ -523,6 +523,8 @@ designer/objinspext.pas svneol=native#text/pascal
|
|||||||
designer/scalecompsdlg.lfm svneol=native#text/plain
|
designer/scalecompsdlg.lfm svneol=native#text/plain
|
||||||
designer/scalecompsdlg.lrs svneol=native#text/plain
|
designer/scalecompsdlg.lrs svneol=native#text/plain
|
||||||
designer/scalecompsdlg.pp svneol=native#text/pascal
|
designer/scalecompsdlg.pp svneol=native#text/pascal
|
||||||
|
designer/sizecompsdlg.lfm svneol=native#text/plain
|
||||||
|
designer/sizecompsdlg.lrs svneol=native#text/plain
|
||||||
designer/sizecompsdlg.pp svneol=native#text/pascal
|
designer/sizecompsdlg.pp svneol=native#text/pascal
|
||||||
designer/taborderdlg.lfm svneol=native#text/plain
|
designer/taborderdlg.lfm svneol=native#text/plain
|
||||||
designer/taborderdlg.lrs svneol=native#text/pascal
|
designer/taborderdlg.lrs svneol=native#text/pascal
|
||||||
|
|||||||
100
designer/sizecompsdlg.lfm
Normal file
100
designer/sizecompsdlg.lfm
Normal file
@ -0,0 +1,100 @@
|
|||||||
|
object SizeComponentsDialog: TSizeComponentsDialog
|
||||||
|
ActiveControl = OKButton
|
||||||
|
BorderStyle = bsSizeToolWin
|
||||||
|
Caption = 'SizeComponentsDialog'
|
||||||
|
ClientHeight = 190
|
||||||
|
ClientWidth = 380
|
||||||
|
OnResize = FormResize
|
||||||
|
PixelsPerInch = 96
|
||||||
|
Position = poScreenCenter
|
||||||
|
HorzScrollBar.Page = 379
|
||||||
|
VertScrollBar.Page = 189
|
||||||
|
Left = 379
|
||||||
|
Height = 190
|
||||||
|
Top = 779
|
||||||
|
Width = 380
|
||||||
|
object OKButton: TBitBtn
|
||||||
|
Anchors = [akRight, akBottom]
|
||||||
|
AutoSize = True
|
||||||
|
BorderSpacing.Bottom = 6
|
||||||
|
BorderSpacing.InnerBorder = 2
|
||||||
|
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
|
||||||
|
Anchors = [akRight, akBottom]
|
||||||
|
AutoSize = True
|
||||||
|
BorderSpacing.Right = 6
|
||||||
|
BorderSpacing.InnerBorder = 2
|
||||||
|
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
|
||||||
|
Top = 6
|
||||||
|
Width = 181
|
||||||
|
object WidthEdit: TEdit
|
||||||
|
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
|
||||||
|
Top = 6
|
||||||
|
Width = 181
|
||||||
|
object HeightEdit: TEdit
|
||||||
|
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
|
||||||
37
designer/sizecompsdlg.lrs
Normal file
37
designer/sizecompsdlg.lrs
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
{ This is an automatically generated lazarus resource file }
|
||||||
|
|
||||||
|
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#25
|
||||||
|
+'BorderSpacing.InnerBorder'#2#2#7'Caption'#6#3'&OK'#7'Default'#9#4'Kind'#7#4
|
||||||
|
+'bkOK'#11'ModalResult'#2#1#9'NumGlyphs'#2#0#8'TabOrder'#2#0#24'AnchorSideBot'
|
||||||
|
+'tom.Control'#7#5'Owner'#21'AnchorSideBottom.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'CancelBu'
|
||||||
|
+'tton'#7'Anchors'#11#7'akRight'#8'akBottom'#0#8'AutoSize'#9#19'BorderSpacing'
|
||||||
|
+'.Right'#2#6#25'BorderSpacing.InnerBorder'#2#2#7'Caption'#6#6'Cancel'#4'Kind'
|
||||||
|
+#7#8'bkCancel'#11'ModalResult'#2#2#9'NumGlyphs'#2#0#8'TabOrder'#2#1#23'Ancho'
|
||||||
|
+'rSideRight.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'Anchors'#11#5
|
||||||
|
+'akTop'#6'akLeft'#8'akBottom'#0#18'BorderSpacing.Left'#2#6#7'Caption'#6#15'W'
|
||||||
|
+'idthRadioGroup'#8'TabOrder'#2#2#22'AnchorSideLeft.Control'#7#5'Owner'#24'An'
|
||||||
|
+'chorSideBottom.Control'#7#16'HeightRadioGroup'#21'AnchorSideBottom.Side'#7#9
|
||||||
|
+'asrBottom'#4'Left'#2#6#6'Height'#3#138#0#3'Top'#2#6#5'Width'#3#181#0#0#5'TE'
|
||||||
|
+'dit'#9'WidthEdit'#7'Anchors'#11#7'akRight'#8'akBottom'#0#20'BorderSpacing.A'
|
||||||
|
+'round'#2#6#8'TabOrder'#2#0#4'Text'#6#9'WidthEdit'#24'AnchorSideBottom.Contr'
|
||||||
|
+'ol'#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'Height'
|
||||||
|
+'RadioGroup'#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#8'akBottom'#0#20'Bo'
|
||||||
|
+'rderSpacing.Around'#2#6#7'Caption'#6#16'HeightRadioGroup'#8'TabOrder'#2#3#23
|
||||||
|
+'AnchorSideRight.Control'#7#5'Owner'#20'AnchorSideRight.Side'#7#9'asrBottom'
|
||||||
|
+#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'akRig'
|
||||||
|
+'ht'#8'akBottom'#0#20'BorderSpacing.Around'#2#6#8'TabOrder'#2#0#4'Text'#6#10
|
||||||
|
+'HeightEdit'#24'AnchorSideBottom.Control'#7#16'HeightRadioGroup'#21'AnchorSi'
|
||||||
|
+'deBottom.Side'#7#9'asrBottom'#4'Left'#2'['#6'Height'#2#23#3'Top'#2'['#5'Wid'
|
||||||
|
+'th'#2'P'#0#0#0#0
|
||||||
|
]);
|
||||||
@ -34,20 +34,19 @@ uses
|
|||||||
LResources;
|
LResources;
|
||||||
|
|
||||||
type
|
type
|
||||||
|
{ TSizeComponentsDialog }
|
||||||
TSizeComponentsDialog = class(TForm)
|
TSizeComponentsDialog = class(TForm)
|
||||||
|
OKButton: TBitBtn;
|
||||||
|
CancelButton: TBitBtn;
|
||||||
WidthRadioGroup: TRadioGroup;
|
WidthRadioGroup: TRadioGroup;
|
||||||
WidthEdit: TEdit;
|
|
||||||
HeightRadioGroup: TRadioGroup;
|
HeightRadioGroup: TRadioGroup;
|
||||||
|
WidthEdit: TEdit;
|
||||||
HeightEdit: TEdit;
|
HeightEdit: TEdit;
|
||||||
OkButton: TButton;
|
procedure FormResize(Sender: TObject);
|
||||||
CancelButton: TButton;
|
|
||||||
procedure OkButtonClick(Sender: TObject);
|
|
||||||
procedure CancelButtonClick(Sender: TObject);
|
|
||||||
public
|
public
|
||||||
constructor Create(AOwner: TComponent); override;
|
constructor Create(AOwner: TComponent); override;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
function ShowSizeComponentsDialog(var HorizSizingID, FixedWidth,
|
function ShowSizeComponentsDialog(var HorizSizingID, FixedWidth,
|
||||||
VertSizingID, FixedHeight: integer): TModalResult;
|
VertSizingID, FixedHeight: integer): TModalResult;
|
||||||
|
|
||||||
@ -59,9 +58,6 @@ var SizeComponentsDialog: TSizeComponentsDialog;
|
|||||||
begin
|
begin
|
||||||
SizeComponentsDialog:=TSizeComponentsDialog.Create(nil);
|
SizeComponentsDialog:=TSizeComponentsDialog.Create(nil);
|
||||||
with SizeComponentsDialog do begin
|
with SizeComponentsDialog do begin
|
||||||
SetBounds((Screen.Width-365) div 2,(Screen.Height-175) div 2,355,165);
|
|
||||||
WidthRadioGroup.ItemIndex:=0;
|
|
||||||
HeightRadioGroup.ItemIndex:=0;
|
|
||||||
Result:=ShowModal;
|
Result:=ShowModal;
|
||||||
HorizSizingID:=SizeComponentsDialog.WidthRadioGroup.ItemIndex;
|
HorizSizingID:=SizeComponentsDialog.WidthRadioGroup.ItemIndex;
|
||||||
FixedWidth:=StrToIntDef(SizeComponentsDialog.WidthEdit.Text,0);
|
FixedWidth:=StrToIntDef(SizeComponentsDialog.WidthEdit.Text,0);
|
||||||
@ -70,114 +66,54 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
{ TSizeComponentsDialog }
|
{ TSizeComponentsDialog }
|
||||||
|
|
||||||
|
procedure TSizeComponentsDialog.FormResize(Sender: TObject);
|
||||||
|
begin
|
||||||
|
WidthRadioGroup.Width := ClientWidth div 2 - 9;
|
||||||
|
HeightRadioGroup.Left := WidthRadioGroup.Width + 12;
|
||||||
|
HeightRadioGroup.Width := ClientWidth div 2 - 9;
|
||||||
|
end;
|
||||||
|
|
||||||
constructor TSizeComponentsDialog.Create(AOwner: TComponent);
|
constructor TSizeComponentsDialog.Create(AOwner: TComponent);
|
||||||
begin
|
begin
|
||||||
inherited Create(AOwner);
|
inherited Create(AOwner);
|
||||||
if LazarusResources.Find(Classname)=nil then begin
|
|
||||||
SetBounds((Screen.Width-365) div 2,(Screen.Height-175) div 2,355,165);
|
|
||||||
Caption:='Size';
|
|
||||||
|
|
||||||
WidthRadioGroup:=TRadioGroup.Create(Self);
|
Caption:='Size';
|
||||||
with WidthRadioGroup do begin
|
|
||||||
Name:='WidthRadioGroup';
|
|
||||||
Parent:=Self;
|
|
||||||
Left:=5;
|
|
||||||
Top:=5;
|
|
||||||
Width:=170;
|
|
||||||
Height:=115;
|
|
||||||
Caption:='Width:';
|
|
||||||
with Items do begin
|
|
||||||
BeginUpdate;
|
|
||||||
Add('No change');
|
|
||||||
Add('Shrink to smallest');
|
|
||||||
Add('Grow to Largest');
|
|
||||||
Add('Width:');
|
|
||||||
EndUpdate;
|
|
||||||
end;
|
|
||||||
Show;
|
|
||||||
end;
|
|
||||||
|
|
||||||
WidthEdit:=TEdit.Create(Self);
|
with WidthRadioGroup do begin
|
||||||
with WidthEdit do begin
|
Caption:='Width:';
|
||||||
Name:='WidthEdit';
|
with Items do begin
|
||||||
Parent:=Self;
|
BeginUpdate;
|
||||||
Left:=87;
|
Add('No change');
|
||||||
Top:=90;
|
Add('Shrink to smallest');
|
||||||
Width:=60;
|
Add('Grow to Largest');
|
||||||
Text:='';
|
Add('Width:');
|
||||||
Show;
|
EndUpdate;
|
||||||
end;
|
|
||||||
|
|
||||||
HeightRadioGroup:=TRadioGroup.Create(Self);
|
|
||||||
with HeightRadioGroup do begin
|
|
||||||
Name:='HeightRadioGroup';
|
|
||||||
Parent:=Self;
|
|
||||||
Left:=180;
|
|
||||||
Top:=5;
|
|
||||||
Width:=170;
|
|
||||||
Height:=115;
|
|
||||||
Caption:='Height:';
|
|
||||||
with Items do begin
|
|
||||||
BeginUpdate;
|
|
||||||
Add('No change');
|
|
||||||
Add('Shrink to smallest');
|
|
||||||
Add('Grow to Largest');
|
|
||||||
Add('Height:');
|
|
||||||
EndUpdate;
|
|
||||||
end;
|
|
||||||
Show;
|
|
||||||
end;
|
|
||||||
|
|
||||||
HeightEdit:=TEdit.Create(Self);
|
|
||||||
with HeightEdit do begin
|
|
||||||
Name:='HeightEdit';
|
|
||||||
Parent:=Self;
|
|
||||||
Left:=262;
|
|
||||||
Top:=90;
|
|
||||||
Width:=60;
|
|
||||||
Text:='';
|
|
||||||
Show;
|
|
||||||
end;
|
|
||||||
|
|
||||||
OkButton:=TButton.Create(Self);
|
|
||||||
with OkButton do begin
|
|
||||||
Name:='OkButton';
|
|
||||||
Parent:=Self;
|
|
||||||
Left:=145;
|
|
||||||
Top:=WidthRadioGroup.Top+WidthRadioGroup.Height+10;
|
|
||||||
Width:=75;
|
|
||||||
Height:=25;
|
|
||||||
Caption:='Ok';
|
|
||||||
OnClick:=@OkButtonClick;
|
|
||||||
Show;
|
|
||||||
end;
|
|
||||||
|
|
||||||
CancelButton:=TButton.Create(Self);
|
|
||||||
with CancelButton do begin
|
|
||||||
Name:='CancelButton';
|
|
||||||
Parent:=Self;
|
|
||||||
Left:=235;
|
|
||||||
Top:=OkButton.Top;
|
|
||||||
Width:=75;
|
|
||||||
Height:=25;
|
|
||||||
Caption:='Cancel';
|
|
||||||
OnClick:=@CancelButtonClick;
|
|
||||||
Show;
|
|
||||||
end;
|
end;
|
||||||
|
ItemIndex:=0;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
with HeightRadioGroup do begin
|
||||||
|
Caption:='Height:';
|
||||||
|
with Items do begin
|
||||||
|
BeginUpdate;
|
||||||
|
Add('No change');
|
||||||
|
Add('Shrink to smallest');
|
||||||
|
Add('Grow to Largest');
|
||||||
|
Add('Height:');
|
||||||
|
EndUpdate;
|
||||||
|
end;
|
||||||
|
ItemIndex:=0;
|
||||||
|
end;
|
||||||
|
|
||||||
|
WidthEdit.Text:='';
|
||||||
|
HeightEdit.Text:='';
|
||||||
|
|
||||||
|
OkButton.Caption:='Ok';
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TSizeComponentsDialog.OkButtonClick(Sender: TObject);
|
initialization
|
||||||
begin
|
{$i sizecompsdlg.lrs}
|
||||||
ModalResult:=mrOk;
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TSizeComponentsDialog.CancelButtonClick(Sender: TObject);
|
|
||||||
begin
|
|
||||||
ModalResult:=mrCancel;
|
|
||||||
end;
|
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user