IDEIntf: improved ListView editor layout

git-svn-id: trunk@29557 -
This commit is contained in:
maxim 2011-02-14 23:43:05 +00:00
parent b5eef598e9
commit aa89d68f66
2 changed files with 43 additions and 107 deletions

View File

@ -12,11 +12,10 @@ object ListViewItemsEditorForm: TListViewItemsEditorForm
Constraints.MinWidth = 400 Constraints.MinWidth = 400
OnCreate = FormCreate OnCreate = FormCreate
Position = poScreenCenter Position = poScreenCenter
LCLVersion = '0.9.29' LCLVersion = '0.9.31'
object GroupBox1: TGroupBox object GroupBox1: TGroupBox
AnchorSideLeft.Control = Owner AnchorSideLeft.Control = Owner
AnchorSideTop.Control = Owner AnchorSideTop.Control = Owner
AnchorSideBottom.Control = BtnPanel
Left = 6 Left = 6
Height = 247 Height = 247
Top = 6 Top = 6
@ -24,7 +23,7 @@ object ListViewItemsEditorForm: TListViewItemsEditorForm
Anchors = [akTop, akLeft, akBottom] Anchors = [akTop, akLeft, akBottom]
BorderSpacing.Around = 6 BorderSpacing.Around = 6
Caption = 'Items' Caption = 'Items'
ClientHeight = 228 ClientHeight = 229
ClientWidth = 291 ClientWidth = 291
TabOrder = 0 TabOrder = 0
object TreeView1: TTreeView object TreeView1: TTreeView
@ -33,14 +32,14 @@ object ListViewItemsEditorForm: TListViewItemsEditorForm
AnchorSideBottom.Control = GroupBox1 AnchorSideBottom.Control = GroupBox1
AnchorSideBottom.Side = asrBottom AnchorSideBottom.Side = asrBottom
Left = 5 Left = 5
Height = 218 Height = 219
Top = 5 Top = 5
Width = 160 Width = 160
Anchors = [akTop, akLeft, akRight, akBottom] Anchors = [akTop, akLeft, akRight, akBottom]
BorderSpacing.Left = 5 BorderSpacing.Left = 5
BorderSpacing.Top = 5 BorderSpacing.Top = 5
BorderSpacing.Bottom = 5 BorderSpacing.Bottom = 5
DefaultItemHeight = 19 DefaultItemHeight = 15
HideSelection = False HideSelection = False
ReadOnly = True ReadOnly = True
TabOrder = 0 TabOrder = 0
@ -61,7 +60,6 @@ object ListViewItemsEditorForm: TListViewItemsEditorForm
Anchors = [akTop, akLeft, akRight] Anchors = [akTop, akLeft, akRight]
BorderSpacing.Around = 6 BorderSpacing.Around = 6
Caption = '&New Item' Caption = '&New Item'
Default = True
OnClick = BtnNewItemClick OnClick = BtnNewItemClick
TabOrder = 1 TabOrder = 1
end end
@ -106,7 +104,6 @@ object ListViewItemsEditorForm: TListViewItemsEditorForm
AnchorSideTop.Control = Owner AnchorSideTop.Control = Owner
AnchorSideRight.Control = Owner AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom AnchorSideRight.Side = asrBottom
AnchorSideBottom.Control = BtnPanel
Left = 307 Left = 307
Height = 247 Height = 247
Top = 6 Top = 6
@ -114,16 +111,16 @@ object ListViewItemsEditorForm: TListViewItemsEditorForm
Anchors = [akTop, akLeft, akRight, akBottom] Anchors = [akTop, akLeft, akRight, akBottom]
BorderSpacing.Around = 6 BorderSpacing.Around = 6
Caption = 'Item Properties' Caption = 'Item Properties'
ClientHeight = 228 ClientHeight = 229
ClientWidth = 208 ClientWidth = 208
TabOrder = 1 TabOrder = 1
object LabelCaption: TLabel object LabelCaption: TLabel
AnchorSideLeft.Control = GroupBox2 AnchorSideLeft.Control = GroupBox2
AnchorSideTop.Control = GroupBox2 AnchorSideTop.Control = GroupBox2
Left = 6 Left = 6
Height = 18 Height = 14
Top = 6 Top = 6
Width = 55 Width = 42
BorderSpacing.Left = 6 BorderSpacing.Left = 6
BorderSpacing.Top = 6 BorderSpacing.Top = 6
Caption = 'Caption:' Caption = 'Caption:'
@ -135,9 +132,9 @@ object ListViewItemsEditorForm: TListViewItemsEditorForm
AnchorSideTop.Control = edtText AnchorSideTop.Control = edtText
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
Left = 6 Left = 6
Height = 18 Height = 14
Top = 59 Top = 49
Width = 86 Width = 66
BorderSpacing.Top = 6 BorderSpacing.Top = 6
Caption = 'Image Index:' Caption = 'Image Index:'
FocusControl = edtIndexImg FocusControl = edtIndexImg
@ -148,9 +145,9 @@ object ListViewItemsEditorForm: TListViewItemsEditorForm
AnchorSideTop.Control = edtIndexImg AnchorSideTop.Control = edtIndexImg
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
Left = 6 Left = 6
Height = 18 Height = 14
Top = 112 Top = 92
Width = 79 Width = 62
BorderSpacing.Top = 6 BorderSpacing.Top = 6
Caption = 'State Index:' Caption = 'State Index:'
FocusControl = edtIndexState FocusControl = edtIndexState
@ -163,8 +160,8 @@ object ListViewItemsEditorForm: TListViewItemsEditorForm
AnchorSideRight.Control = GroupBox2 AnchorSideRight.Control = GroupBox2
AnchorSideRight.Side = asrBottom AnchorSideRight.Side = asrBottom
Left = 6 Left = 6
Height = 27 Height = 21
Top = 26 Top = 22
Width = 197 Width = 197
Anchors = [akTop, akLeft, akRight] Anchors = [akTop, akLeft, akRight]
BorderSpacing.Top = 2 BorderSpacing.Top = 2
@ -177,8 +174,8 @@ object ListViewItemsEditorForm: TListViewItemsEditorForm
AnchorSideTop.Control = LabelImageIndex AnchorSideTop.Control = LabelImageIndex
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
Left = 6 Left = 6
Height = 27 Height = 21
Top = 79 Top = 65
Width = 48 Width = 48
BorderSpacing.Top = 2 BorderSpacing.Top = 2
OnEditingDone = edtIndexStateEditingDone OnEditingDone = edtIndexStateEditingDone
@ -189,88 +186,28 @@ object ListViewItemsEditorForm: TListViewItemsEditorForm
AnchorSideTop.Control = LabelStateIndex AnchorSideTop.Control = LabelStateIndex
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
Left = 6 Left = 6
Height = 27 Height = 21
Top = 132 Top = 108
Width = 48 Width = 48
BorderSpacing.Top = 2 BorderSpacing.Top = 2
OnEditingDone = edtIndexStateEditingDone OnEditingDone = edtIndexStateEditingDone
TabOrder = 2 TabOrder = 2
end end
end end
object BtnPanel: TPanel object ButtonPanel: TButtonPanel
Left = 0 Left = 6
Height = 41 Height = 34
Top = 259 Top = 260
Width = 525 Width = 513
Align = alBottom OKButton.Name = 'OKButton'
AutoSize = True OKButton.Caption = '&ОК'
BevelOuter = bvNone HelpButton.Name = 'HelpButton'
ClientHeight = 41 HelpButton.Caption = '&Справка'
ClientWidth = 525 CloseButton.Name = 'CloseButton'
CloseButton.Caption = '&Закрыть'
CloseButton.OnClick = btnApplyClick
CancelButton.Name = 'CancelButton'
CancelButton.Caption = 'Отмена'
TabOrder = 2 TabOrder = 2
object BtnHelp: TBitBtn
AnchorSideRight.Side = asrBottom
AnchorSideBottom.Side = asrBottom
Left = 6
Height = 29
Top = 6
Width = 75
Align = alLeft
AutoSize = True
BorderSpacing.Around = 6
Caption = '&Help'
Constraints.MinWidth = 75
Kind = bkHelp
NumGlyphs = 0
TabOrder = 0
end
object BtnOK: TBitBtn
AnchorSideBottom.Side = asrBottom
Left = 282
Height = 29
Top = 6
Width = 75
Align = alRight
AutoSize = True
BorderSpacing.Around = 6
Caption = '&OK'
Constraints.MinWidth = 75
Kind = bkOK
ModalResult = 1
NumGlyphs = 0
TabOrder = 1
end
object BtnCancel: TBitBtn
AnchorSideBottom.Side = asrBottom
Left = 363
Height = 29
Top = 6
Width = 75
Align = alRight
AutoSize = True
BorderSpacing.Around = 6
Cancel = True
Caption = 'Cancel'
Constraints.MinWidth = 75
Kind = bkCancel
ModalResult = 2
NumGlyphs = 0
TabOrder = 2
end
object BtnApply: TBitBtn
AnchorSideBottom.Side = asrBottom
Left = 444
Height = 29
Top = 6
Width = 75
Align = alRight
AutoSize = True
BorderSpacing.Around = 6
Caption = '&Apply'
Constraints.MinWidth = 75
NumGlyphs = 0
OnClick = btnApplyClick
TabOrder = 3
end
end end
end end

View File

@ -33,21 +33,18 @@ unit ListViewPropEdit;
interface interface
uses uses
Classes, SysUtils, Forms, Controls, Graphics, Dialogs, ComCtrls, Classes, SysUtils, Forms, Controls, Graphics, Dialogs, ComCtrls, StdCtrls,
StdCtrls, Buttons, ExtCtrls, Menus, PropEdits, ComponentEditors, LCLProc, Buttons, ExtCtrls, Menus, PropEdits, ComponentEditors, LCLProc, ButtonPanel,
ObjInspStrConsts; ObjInspStrConsts;
type type
{ TListViewItemsEditorForm } { TListViewItemsEditorForm }
TListViewItemsEditorForm = class(TForm) TListViewItemsEditorForm = class(TForm)
BtnOK: TBitBtn;
BtnCancel: TBitBtn;
BtnApply: TBitBtn;
BtnHelp: TBitBtn;
BtnNewItem: TButton; BtnNewItem: TButton;
BtnNewSubItem: TButton; BtnNewSubItem: TButton;
BtnDelete: TButton; BtnDelete: TButton;
ButtonPanel: TButtonPanel;
edtText: TEdit; edtText: TEdit;
edtIndexImg: TEdit; edtIndexImg: TEdit;
edtIndexState: TEdit; edtIndexState: TEdit;
@ -56,7 +53,6 @@ type
LabelCaption: TLabel; LabelCaption: TLabel;
LabelImageIndex: TLabel; LabelImageIndex: TLabel;
LabelStateIndex: TLabel; LabelStateIndex: TLabel;
BtnPanel: TPanel;
TreeView1: TTreeView; TreeView1: TTreeView;
procedure BtnNewItemClick(Sender: TObject); procedure BtnNewItemClick(Sender: TObject);
procedure Edit1Change(Sender: TObject); procedure Edit1Change(Sender: TObject);
@ -152,10 +148,13 @@ begin
BtnNewSubItem.Caption := sccsLvEdtNewSubItem; BtnNewSubItem.Caption := sccsLvEdtNewSubItem;
BtnDelete.Caption := sccsLvEdtDelete; BtnDelete.Caption := sccsLvEdtDelete;
BtnHelp.Caption := oisHelp; ButtonPanel.HelpButton.Caption := oisHelp;
BtnOK.Caption := oisOK; ButtonPanel.OKButton.Caption := oisOK;
BtnCancel.Caption := oisCancel; ButtonPanel.CancelButton.Caption := oisCancel;
BtnApply.Caption := sccsLvEdtApply; ButtonPanel.CloseButton.Caption := sccsLvEdtApply;
ButtonPanel.CloseButton.Kind := bkCustom;
ButtonPanel.CloseButton.Glyph := nil;
ButtonPanel.CloseButton.ModalResult := mrNone;
LabelCaption.Caption := sccsLvEdtLabelCaption; LabelCaption.Caption := sccsLvEdtLabelCaption;
LabelImageIndex.Caption := sccsLvEdtLabelImageIndex; LabelImageIndex.Caption := sccsLvEdtLabelImageIndex;