mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-19 22:49:30 +02:00
implemented TButtonPanel
git-svn-id: trunk@16987 -
This commit is contained in:
parent
96eaf4348b
commit
d9c9a84e51
@ -2,55 +2,93 @@ object EncloseSelectionDialog: TEncloseSelectionDialog
|
||||
Left = 319
|
||||
Height = 244
|
||||
Top = 231
|
||||
Width = 427
|
||||
Width = 331
|
||||
HelpContext = 0
|
||||
ActiveControl = ButtonPanel.CloseButton
|
||||
Align = alNone
|
||||
AllowDropFiles = False
|
||||
AutoScroll = True
|
||||
AutoSize = False
|
||||
BorderIcons = [biSystemMenu, biMinimize, biMaximize]
|
||||
BorderStyle = bsSizeable
|
||||
Caption = 'Enclose Selection'
|
||||
ChildSizing.LeftRightSpacing = 0
|
||||
ChildSizing.TopBottomSpacing = 0
|
||||
ChildSizing.HorizontalSpacing = 0
|
||||
ChildSizing.VerticalSpacing = 0
|
||||
ChildSizing.ControlsPerLine = 0
|
||||
ClientHeight = 244
|
||||
ClientWidth = 427
|
||||
ClientWidth = 331
|
||||
DockSite = False
|
||||
DragKind = dkDrag
|
||||
DragMode = dmManual
|
||||
Enabled = True
|
||||
Font.Height = 0
|
||||
Font.Style = []
|
||||
FormStyle = fsNormal
|
||||
OnCreate = EncloseSelectionDialogCREATE
|
||||
OnResize = EncloseSelectionDialogResize
|
||||
ParentBiDiMode = True
|
||||
ParentFont = False
|
||||
Position = poScreenCenter
|
||||
LCLVersion = '0.9.25'
|
||||
ShowInTaskBar = stDefault
|
||||
UseDockManager = False
|
||||
LCLVersion = '0.9.27'
|
||||
WindowState = wsNormal
|
||||
object TypeRadiogroup: TRadioGroup
|
||||
Left = 8
|
||||
Height = 189
|
||||
Top = 8
|
||||
Width = 409
|
||||
Anchors = [akTop, akLeft, akRight, akBottom]
|
||||
Left = 6
|
||||
Height = 184
|
||||
Top = 6
|
||||
Width = 319
|
||||
HelpContext = 0
|
||||
Align = alClient
|
||||
AutoFill = True
|
||||
AutoSize = False
|
||||
BorderSpacing.Left = 0
|
||||
BorderSpacing.Top = 0
|
||||
BorderSpacing.Right = 0
|
||||
BorderSpacing.Bottom = 0
|
||||
BorderSpacing.Around = 6
|
||||
BorderSpacing.CellAlignHorizontal = ccaFill
|
||||
BorderSpacing.CellAlignVertical = ccaFill
|
||||
Caption = 'Type'
|
||||
ChildSizing.LeftRightSpacing = 6
|
||||
ChildSizing.TopBottomSpacing = 6
|
||||
ChildSizing.HorizontalSpacing = 0
|
||||
ChildSizing.VerticalSpacing = 0
|
||||
ChildSizing.EnlargeHorizontal = crsHomogenousChildResize
|
||||
ChildSizing.EnlargeVertical = crsHomogenousChildResize
|
||||
ChildSizing.ShrinkHorizontal = crsScaleChilds
|
||||
ChildSizing.ShrinkVertical = crsScaleChilds
|
||||
ChildSizing.Layout = cclLeftToRightThenTopToBottom
|
||||
ChildSizing.ControlsPerLine = 1
|
||||
ColumnLayout = clHorizontalThenVertical
|
||||
Columns = 1
|
||||
Ctl3D = False
|
||||
DragCursor = crDrag
|
||||
DragMode = dmManual
|
||||
Enabled = True
|
||||
ItemIndex = -1
|
||||
ParentFont = True
|
||||
ParentColor = True
|
||||
ParentCtl3D = True
|
||||
ParentShowHint = True
|
||||
TabOrder = 0
|
||||
TabStop = True
|
||||
Visible = True
|
||||
end
|
||||
object btnCancel: TBitBtn
|
||||
Left = 224
|
||||
Height = 25
|
||||
Top = 208
|
||||
Width = 104
|
||||
Anchors = [akLeft, akBottom]
|
||||
Cancel = True
|
||||
Caption = 'Cancel'
|
||||
ModalResult = 2
|
||||
NumGlyphs = 0
|
||||
object ButtonPanel: TButtonPanel
|
||||
Left = 6
|
||||
Height = 48
|
||||
Top = 196
|
||||
Width = 319
|
||||
HelpContext = 0
|
||||
Align = alBottom
|
||||
AutoSize = True
|
||||
ButtonOrder = boDefault
|
||||
TabOrder = 1
|
||||
end
|
||||
object btnOk: TBitBtn
|
||||
Left = 88
|
||||
Height = 25
|
||||
Top = 208
|
||||
Width = 107
|
||||
Anchors = [akLeft, akBottom]
|
||||
Caption = 'Ok'
|
||||
Default = True
|
||||
NumGlyphs = 0
|
||||
OnClick = btnOkClick
|
||||
TabOrder = 2
|
||||
DefaultButton = pbOK
|
||||
ShowButtons = [pbOK, pbCancel]
|
||||
ShowGlyphs = [pbOK, pbCancel, pbClose, pbHelp]
|
||||
Visible = True
|
||||
end
|
||||
end
|
||||
|
@ -2,22 +2,37 @@
|
||||
|
||||
LazarusResources.Add('TEncloseSelectionDialog','FORMDATA',[
|
||||
'TPF0'#23'TEncloseSelectionDialog'#22'EncloseSelectionDialog'#4'Left'#3'?'#1#6
|
||||
+'Height'#3#244#0#3'Top'#3#231#0#5'Width'#3#171#1#7'Caption'#6#17'Enclose Sel'
|
||||
+'ection'#12'ClientHeight'#3#244#0#11'ClientWidth'#3#171#1#8'OnCreate'#7#28'E'
|
||||
+'ncloseSelectionDialogCREATE'#8'OnResize'#7#28'EncloseSelectionDialogResize'
|
||||
+#10'ParentFont'#8#8'Position'#7#14'poScreenCenter'#10'LCLVersion'#6#6'0.9.25'
|
||||
+#0#11'TRadioGroup'#14'TypeRadiogroup'#4'Left'#2#8#6'Height'#3#189#0#3'Top'#2
|
||||
+#8#5'Width'#3#153#1#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#8'akBottom'#0
|
||||
+#8'AutoFill'#9#7'Caption'#6#4'Type'#28'ChildSizing.LeftRightSpacing'#2#6#28
|
||||
+'ChildSizing.TopBottomSpacing'#2#6#29'ChildSizing.EnlargeHorizontal'#7#24'cr'
|
||||
+'sHomogenousChildResize'#27'ChildSizing.EnlargeVertical'#7#24'crsHomogenousC'
|
||||
+'hildResize'#28'ChildSizing.ShrinkHorizontal'#7#14'crsScaleChilds'#26'ChildS'
|
||||
+'izing.ShrinkVertical'#7#14'crsScaleChilds'#18'ChildSizing.Layout'#7#29'cclL'
|
||||
+'eftToRightThenTopToBottom'#27'ChildSizing.ControlsPerLine'#2#1#8'TabOrder'#2
|
||||
+#0#0#0#7'TBitBtn'#9'btnCancel'#4'Left'#3#224#0#6'Height'#2#25#3'Top'#3#208#0
|
||||
+#5'Width'#2'h'#7'Anchors'#11#6'akLeft'#8'akBottom'#0#6'Cancel'#9#7'Caption'#6
|
||||
+#6'Cancel'#11'ModalResult'#2#2#9'NumGlyphs'#2#0#8'TabOrder'#2#1#0#0#7'TBitBt'
|
||||
+'n'#5'btnOk'#4'Left'#2'X'#6'Height'#2#25#3'Top'#3#208#0#5'Width'#2'k'#7'Anch'
|
||||
+'ors'#11#6'akLeft'#8'akBottom'#0#7'Caption'#6#2'Ok'#7'Default'#9#9'NumGlyphs'
|
||||
+#2#0#7'OnClick'#7#10'btnOkClick'#8'TabOrder'#2#2#0#0#0
|
||||
+'Height'#3#244#0#3'Top'#3#231#0#5'Width'#3'K'#1#11'HelpContext'#2#0#13'Activ'
|
||||
+'eControl'#7#23'ButtonPanel.CloseButton'#5'Align'#7#6'alNone'#14'AllowDropFi'
|
||||
+'les'#8#10'AutoScroll'#9#8'AutoSize'#8#11'BorderIcons'#11#12'biSystemMenu'#10
|
||||
+'biMinimize'#10'biMaximize'#0#11'BorderStyle'#7#10'bsSizeable'#7'Caption'#6
|
||||
+#17'Enclose Selection'#28'ChildSizing.LeftRightSpacing'#2#0#28'ChildSizing.T'
|
||||
+'opBottomSpacing'#2#0#29'ChildSizing.HorizontalSpacing'#2#0#27'ChildSizing.V'
|
||||
+'erticalSpacing'#2#0#27'ChildSizing.ControlsPerLine'#2#0#12'ClientHeight'#3
|
||||
+#244#0#11'ClientWidth'#3'K'#1#8'DockSite'#8#8'DragKind'#7#6'dkDrag'#8'DragMo'
|
||||
+'de'#7#8'dmManual'#7'Enabled'#9#11'Font.Height'#2#0#10'Font.Style'#11#0#9'Fo'
|
||||
+'rmStyle'#7#8'fsNormal'#8'OnCreate'#7#28'EncloseSelectionDialogCREATE'#14'Pa'
|
||||
+'rentBiDiMode'#9#10'ParentFont'#8#8'Position'#7#14'poScreenCenter'#13'ShowIn'
|
||||
+'TaskBar'#7#9'stDefault'#14'UseDockManager'#8#10'LCLVersion'#6#6'0.9.27'#11
|
||||
+'WindowState'#7#8'wsNormal'#0#11'TRadioGroup'#14'TypeRadiogroup'#4'Left'#2#6
|
||||
+#6'Height'#3#184#0#3'Top'#2#6#5'Width'#3'?'#1#11'HelpContext'#2#0#5'Align'#7
|
||||
+#8'alClient'#8'AutoFill'#9#8'AutoSize'#8#18'BorderSpacing.Left'#2#0#17'Borde'
|
||||
+'rSpacing.Top'#2#0#19'BorderSpacing.Right'#2#0#20'BorderSpacing.Bottom'#2#0
|
||||
+#20'BorderSpacing.Around'#2#6'!BorderSpacing.CellAlignHorizontal'#7#7'ccaFil'
|
||||
+'l'#31'BorderSpacing.CellAlignVertical'#7#7'ccaFill'#7'Caption'#6#4'Type'#28
|
||||
+'ChildSizing.LeftRightSpacing'#2#6#28'ChildSizing.TopBottomSpacing'#2#6#29'C'
|
||||
+'hildSizing.HorizontalSpacing'#2#0#27'ChildSizing.VerticalSpacing'#2#0#29'Ch'
|
||||
+'ildSizing.EnlargeHorizontal'#7#24'crsHomogenousChildResize'#27'ChildSizing.'
|
||||
+'EnlargeVertical'#7#24'crsHomogenousChildResize'#28'ChildSizing.ShrinkHorizo'
|
||||
+'ntal'#7#14'crsScaleChilds'#26'ChildSizing.ShrinkVertical'#7#14'crsScaleChil'
|
||||
+'ds'#18'ChildSizing.Layout'#7#29'cclLeftToRightThenTopToBottom'#27'ChildSizi'
|
||||
+'ng.ControlsPerLine'#2#1#12'ColumnLayout'#7#24'clHorizontalThenVertical'#7'C'
|
||||
+'olumns'#2#1#5'Ctl3D'#8#10'DragCursor'#7#6'crDrag'#8'DragMode'#7#8'dmManual'
|
||||
+#7'Enabled'#9#9'ItemIndex'#2#255#10'ParentFont'#9#11'ParentColor'#9#11'Paren'
|
||||
+'tCtl3D'#9#14'ParentShowHint'#9#8'TabOrder'#2#0#7'TabStop'#9#7'Visible'#9#0#0
|
||||
+#12'TButtonPanel'#11'ButtonPanel'#4'Left'#2#6#6'Height'#2'0'#3'Top'#3#196#0#5
|
||||
+'Width'#3'?'#1#11'HelpContext'#2#0#5'Align'#7#8'alBottom'#8'AutoSize'#9#11'B'
|
||||
+'uttonOrder'#7#9'boDefault'#8'TabOrder'#2#1#13'DefaultButton'#7#4'pbOK'#11'S'
|
||||
+'howButtons'#11#4'pbOK'#8'pbCancel'#0#10'ShowGlyphs'#11#4'pbOK'#8'pbCancel'#7
|
||||
+'pbClose'#6'pbHelp'#0#7'Visible'#9#0#0#0
|
||||
]);
|
||||
|
@ -37,7 +37,7 @@ interface
|
||||
uses
|
||||
Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs, Buttons,
|
||||
ExtCtrls, BasicCodeTools, CodeToolManager, SourceChanger,
|
||||
LazarusIDEStrConsts, LazConf, IDEProcs;
|
||||
LazarusIDEStrConsts, LazConf, IDEProcs, ButtonPanel;
|
||||
|
||||
type
|
||||
TEncloseSelectionType = (
|
||||
@ -54,11 +54,9 @@ type
|
||||
{ TEncloseSelectionDialog }
|
||||
|
||||
TEncloseSelectionDialog = class(TForm)
|
||||
btnCancel: TBitBtn;
|
||||
btnOk: TBitBtn;
|
||||
ButtonPanel: TButtonPanel;
|
||||
TypeRadiogroup: TRADIOGROUP;
|
||||
procedure EncloseSelectionDialogCREATE(Sender: TObject);
|
||||
procedure EncloseSelectionDialogResize(Sender: TObject);
|
||||
procedure btnOkClick(Sender: TObject);
|
||||
private
|
||||
public
|
||||
@ -405,10 +403,10 @@ var
|
||||
t: TEncloseSelectionType;
|
||||
begin
|
||||
Caption:=lisEncloseSelection;
|
||||
btnOk.Caption:=lisEnclose;
|
||||
btnCancel.Caption:=dlgCancel;
|
||||
btnOk.LoadGlyphFromLazarusResource('btn_ok');
|
||||
btnCancel.LoadGlyphFromLazarusResource('btn_cancel');
|
||||
ButtonPanel.OKButton.Caption:=lisEnclose;
|
||||
ButtonPanel.OKButton.OnClick := @btnOKClick;
|
||||
ButtonPanel.CancelButton.Caption:=dlgCancel;
|
||||
|
||||
TypeRadiogroup.Caption:=lisChooseStructureToEncloseSelection;
|
||||
with TypeRadiogroup.Items do begin
|
||||
BeginUpdate;
|
||||
@ -419,16 +417,6 @@ begin
|
||||
TypeRadiogroup.ItemIndex:=0;
|
||||
end;
|
||||
|
||||
procedure TEncloseSelectionDialog.EncloseSelectionDialogResize(Sender: TObject);
|
||||
var
|
||||
c: Integer;
|
||||
begin
|
||||
c:=Width div 2;
|
||||
btnOk.Width:=c-btnOk.Left-15;
|
||||
btnCancel.Left:=c+15;
|
||||
btnCancel.Width:=btnOk.Width;
|
||||
end;
|
||||
|
||||
procedure TEncloseSelectionDialog.btnOkClick(Sender: TObject);
|
||||
begin
|
||||
if TypeRadiogroup.ItemIndex>=0 then
|
||||
|
Loading…
Reference in New Issue
Block a user