IdeIntf: Add a ButtonPanel and icons for buttons in Select Properties dialog.

git-svn-id: trunk@51936 -
This commit is contained in:
juha 2016-03-14 12:41:23 +00:00
parent c53ffab2f5
commit 29844d46a5
2 changed files with 82 additions and 97 deletions

View File

@ -1,43 +1,45 @@
object SelectPropertiesForm: TSelectPropertiesForm object SelectPropertiesForm: TSelectPropertiesForm
Left = 411 Left = 411
Height = 462 Height = 448
Top = 175 Top = 175
Width = 485 Width = 481
ActiveControl = LBProperties ActiveControl = LBProperties
Caption = 'Select properties' Caption = 'Select properties'
ClientHeight = 462 ClientHeight = 448
ClientWidth = 485 ClientWidth = 481
Constraints.MinHeight = 403
Constraints.MinWidth = 350
OnClose = SelectPropertiesFormClose OnClose = SelectPropertiesFormClose
OnCreate = SelectPropertiesFormCreate OnCreate = SelectPropertiesFormCreate
Position = poScreenCenter Position = poScreenCenter
LCLVersion = '1.1' LCLVersion = '1.7'
object PTop: TPanel object PTop: TPanel
Left = 0 Left = 0
Height = 248 Height = 248
Top = 0 Top = 0
Width = 485 Width = 481
Align = alTop Align = alTop
BevelOuter = bvNone BevelOuter = bvNone
ClientHeight = 248 ClientHeight = 248
ClientWidth = 485 ClientWidth = 481
FullRepaint = False FullRepaint = False
TabOrder = 0 TabOrder = 0
object PProperties: TPanel object PProperties: TPanel
Left = 233 Left = 243
Height = 248 Height = 248
Top = 0 Top = 0
Width = 252 Width = 238
Align = alClient Align = alClient
BevelOuter = bvNone BevelOuter = bvNone
ClientHeight = 248 ClientHeight = 248
ClientWidth = 252 ClientWidth = 238
FullRepaint = False FullRepaint = False
TabOrder = 0 TabOrder = 0
object LProperties: TLabel object LProperties: TLabel
Left = 6 Left = 6
Height = 13 Height = 17
Top = 6 Top = 6
Width = 240 Width = 226
Align = alTop Align = alTop
BorderSpacing.Around = 6 BorderSpacing.Around = 6
Caption = '&Properties' Caption = '&Properties'
@ -47,9 +49,9 @@ object SelectPropertiesForm: TSelectPropertiesForm
end end
object LBProperties: TListBox object LBProperties: TListBox
Left = 6 Left = 6
Height = 217 Height = 213
Top = 25 Top = 29
Width = 240 Width = 226
Align = alClient Align = alClient
BorderSpacing.Around = 6 BorderSpacing.Around = 6
ItemHeight = 0 ItemHeight = 0
@ -63,19 +65,19 @@ object SelectPropertiesForm: TSelectPropertiesForm
Left = 0 Left = 0
Height = 248 Height = 248
Top = 0 Top = 0
Width = 229 Width = 239
Align = alLeft Align = alLeft
BevelOuter = bvNone BevelOuter = bvNone
Caption = 'PComponents' Caption = 'PComponents'
ClientHeight = 248 ClientHeight = 248
ClientWidth = 229 ClientWidth = 239
FullRepaint = False FullRepaint = False
TabOrder = 1 TabOrder = 1
object LComponents: TLabel object LComponents: TLabel
Left = 6 Left = 6
Height = 13 Height = 17
Top = 6 Top = 6
Width = 217 Width = 227
Align = alTop Align = alTop
BorderSpacing.Around = 6 BorderSpacing.Around = 6
Caption = 'Co&mponents' Caption = 'Co&mponents'
@ -85,9 +87,9 @@ object SelectPropertiesForm: TSelectPropertiesForm
end end
object LBComponents: TListBox object LBComponents: TListBox
Left = 6 Left = 6
Height = 217 Height = 213
Top = 25 Top = 29
Width = 217 Width = 227
Align = alClient Align = alClient
BorderSpacing.Around = 6 BorderSpacing.Around = 6
ItemHeight = 0 ItemHeight = 0
@ -97,7 +99,7 @@ object SelectPropertiesForm: TSelectPropertiesForm
end end
end end
object VSplitter: TSplitter object VSplitter: TSplitter
Left = 229 Left = 239
Height = 248 Height = 248
Top = 0 Top = 0
Width = 4 Width = 4
@ -108,28 +110,28 @@ object SelectPropertiesForm: TSelectPropertiesForm
Left = 0 Left = 0
Height = 4 Height = 4
Top = 248 Top = 248
Width = 485 Width = 481
Align = alTop Align = alTop
Beveled = True Beveled = True
ResizeAnchor = akTop ResizeAnchor = akTop
end end
object PBottom: TPanel object PBottom: TPanel
Left = 0 Left = 0
Height = 210 Height = 196
Top = 252 Top = 252
Width = 485 Width = 481
Align = alClient Align = alClient
BevelOuter = bvNone BevelOuter = bvNone
ClientHeight = 210 ClientHeight = 196
ClientWidth = 485 ClientWidth = 481
Constraints.MinHeight = 190 Constraints.MinHeight = 170
FullRepaint = False FullRepaint = False
TabOrder = 1 TabOrder = 1
object LLBSelected: TLabel object LLBSelected: TLabel
Left = 10 Left = 10
Height = 13 Height = 17
Top = 3 Top = 3
Width = 93 Width = 130
BorderSpacing.Around = 6 BorderSpacing.Around = 6
Caption = '&Selected Properties' Caption = '&Selected Properties'
FocusControl = LBSelected FocusControl = LBSelected
@ -140,93 +142,78 @@ object SelectPropertiesForm: TSelectPropertiesForm
AnchorSideTop.Control = LLBSelected AnchorSideTop.Control = LLBSelected
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = BAdd AnchorSideRight.Control = BAdd
AnchorSideBottom.Control = PBottom AnchorSideBottom.Control = ButtonPanel1
AnchorSideBottom.Side = asrBottom
Left = 6 Left = 6
Height = 182 Height = 114
Top = 22 Top = 26
Width = 392 Width = 352
Anchors = [akTop, akLeft, akRight, akBottom] Anchors = [akTop, akLeft, akRight, akBottom]
BorderSpacing.Around = 6 BorderSpacing.Around = 6
ItemHeight = 0 ItemHeight = 0
MultiSelect = True MultiSelect = True
TabOrder = 0 TabOrder = 0
end end
object BAdd: TButton object ButtonPanel1: TButtonPanel
Left = 6
Height = 44
Top = 146
Width = 469
OKButton.Name = 'OKButton'
OKButton.DefaultCaption = True
HelpButton.Name = 'HelpButton'
HelpButton.DefaultCaption = True
CloseButton.Name = 'CloseButton'
CloseButton.DefaultCaption = True
CancelButton.Name = 'CancelButton'
CancelButton.DefaultCaption = True
TabOrder = 1
ShowButtons = [pbOK, pbCancel, pbHelp]
end
object BAdd: TBitBtn
AnchorSideTop.Control = LBSelected AnchorSideTop.Control = LBSelected
AnchorSideRight.Control = PBottom AnchorSideRight.Control = PBottom
AnchorSideRight.Side = asrBottom AnchorSideRight.Side = asrBottom
Left = 404 Left = 364
Height = 25 Height = 28
Top = 22 Top = 26
Width = 75 Width = 111
Anchors = [akTop, akRight] Anchors = [akTop, akRight]
BorderSpacing.Right = 6 BorderSpacing.Right = 6
Caption = '&Add' Caption = '&Add'
OnClick = BAddClick OnClick = BAddClick
TabOrder = 1 TabOrder = 2
end end
object BDelete: TButton object BDelete: TBitBtn
AnchorSideLeft.Control = BAdd AnchorSideLeft.Control = BAdd
AnchorSideTop.Control = BAdd AnchorSideTop.Control = BAdd
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = BAdd AnchorSideRight.Control = BAdd
AnchorSideRight.Side = asrBottom AnchorSideRight.Side = asrBottom
Left = 404 Left = 364
Height = 25 Height = 28
Top = 53 Top = 60
Width = 75 Width = 111
Anchors = [akTop, akLeft, akRight] Anchors = [akTop, akLeft, akRight]
BorderSpacing.Top = 6 BorderSpacing.Top = 6
Caption = '&Delete' Caption = '&Delete'
OnClick = BDeleteClick OnClick = BDeleteClick
TabOrder = 2 TabOrder = 3
end end
object BClear: TButton object BClear: TBitBtn
AnchorSideLeft.Control = BDelete AnchorSideLeft.Control = BDelete
AnchorSideTop.Control = BDelete AnchorSideTop.Control = BDelete
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = BDelete AnchorSideRight.Control = BDelete
AnchorSideRight.Side = asrBottom AnchorSideRight.Side = asrBottom
Left = 404 Left = 364
Height = 25 Height = 28
Top = 84 Top = 94
Width = 75 Width = 111
Anchors = [akTop, akLeft, akRight] Anchors = [akTop, akLeft, akRight]
BorderSpacing.Top = 6 BorderSpacing.Top = 6
Caption = 'C&lear' Caption = 'C&lear'
OnClick = BClearClick OnClick = BClearClick
TabOrder = 3
end
object BOK: TButton
AnchorSideRight.Control = PBottom
AnchorSideRight.Side = asrBottom
AnchorSideBottom.Control = PBottom
AnchorSideBottom.Side = asrBottom
Left = 404
Height = 25
Top = 179
Width = 75
Anchors = [akRight, akBottom]
BorderSpacing.Around = 6
Caption = '&OK'
Default = True
ModalResult = 1
TabOrder = 4 TabOrder = 4
end end
object BCancel: TButton
AnchorSideRight.Control = BOK
AnchorSideRight.Side = asrBottom
AnchorSideBottom.Control = BOK
Left = 404
Height = 25
Top = 148
Width = 75
Anchors = [akRight, akBottom]
Cancel = True
Caption = '&Cancel'
ModalResult = 2
TabOrder = 5
end
end end
end end

View File

@ -13,20 +13,19 @@ unit frmSelectProps;
interface interface
uses uses
Classes, SysUtils, LCLProc, Forms, Controls, Graphics, Dialogs, Classes, SysUtils, RTTIUtils, TypInfo,
StdCtrls, ObjInspStrConsts, IDEWindowIntf, Buttons, ExtCtrls, TypInfo, Forms, StdCtrls, Buttons, ExtCtrls, ButtonPanel,
RTTIUtils; IDEWindowIntf, ObjInspStrConsts;
type type
{ TSelectPropertiesForm } { TSelectPropertiesForm }
TSelectPropertiesForm = class(TForm) TSelectPropertiesForm = class(TForm)
BAdd: TButton; BAdd: TBitBtn;
BDelete: TButton; BClear: TBitBtn;
BClear: TButton; BDelete: TBitBtn;
BOK: TButton; ButtonPanel1: TButtonPanel;
BCancel: TButton;
LLBSelected: TLabel; LLBSelected: TLabel;
LBComponents: TListBox; LBComponents: TListBox;
LComponents: TLabel; LComponents: TLabel;
@ -75,10 +74,8 @@ implementation
procedure TSelectPropertiesForm.SetPropComponent(const AValue: TComponent); procedure TSelectPropertiesForm.SetPropComponent(const AValue: TComponent);
begin begin
if FPropComponent=AValue then exit; if FPropComponent=AValue then exit;
begin
FPropComponent:=AValue; FPropComponent:=AValue;
ShowComponents; ShowComponents;
end
end; end;
procedure TSelectPropertiesForm.LBComponentsSelectionChange(Sender: TObject; procedure TSelectPropertiesForm.LBComponentsSelectionChange(Sender: TObject;
@ -101,10 +98,11 @@ end;
procedure TSelectPropertiesForm.SelectPropertiesFormCreate(Sender: TObject); procedure TSelectPropertiesForm.SelectPropertiesFormCreate(Sender: TObject);
begin begin
BAdd.Caption:=ilesAdd; BAdd.Caption:=ilesAdd;
BAdd.LoadGlyphFromResourceName(HInstance, 'laz_add');
BDelete.Caption:=oisDelete; BDelete.Caption:=oisDelete;
BDelete.LoadGlyphFromResourceName(HInstance, 'laz_delete');
BClear.Caption:=oisClear; BClear.Caption:=oisClear;
BOK.Caption:=oisOk; BClear.LoadGlyphFromResourceName(HInstance, 'menu_clean');
BCancel.Caption:=oiStdActDataSetCancel1Hint;
LComponents.Caption:=oisBtnComponents; LComponents.Caption:=oisBtnComponents;
LProperties.Caption:=oisBtnProperties; LProperties.Caption:=oisBtnProperties;
LLBSelected.Caption:=oisSelectedProperties; LLBSelected.Caption:=oisSelectedProperties;