Changeset 30 for trunk/Forms
- Timestamp:
- Nov 24, 2011, 8:35:25 AM (13 years ago)
- Location:
- trunk/Forms
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/UItemEdit.lfm
r23 r30 1 1 object ItemEditForm: TItemEditForm 2 Left = 251 3 Height = 423 4 Top = 92 5 Width = 552 6 ActiveControl = Panel1 2 Left = 274 3 Height = 486 4 Top = 137 5 Width = 608 7 6 Caption = 'Edit item' 8 ClientHeight = 4 239 ClientWidth = 5527 ClientHeight = 486 8 ClientWidth = 608 10 9 OnClose = FormClose 11 10 OnCreate = FormCreate … … 13 12 OnShow = FormShow 14 13 LCLVersion = '0.9.31' 15 object Panel1: TPanel16 Left = 017 Height = 38018 Top = 019 Width = 55220 Align = alTop21 Anchors = [akLeft, akRight, akBottom]22 BevelOuter = bvNone23 TabOrder = 024 end25 14 object ButtonCancel: TButton 26 Left = 37815 Left = 434 27 16 Height = 25 28 Top = 39417 Top = 457 29 18 Width = 75 30 19 Anchors = [akRight, akBottom] 31 20 Caption = 'Cancel' 32 21 OnClick = ButtonCancelClick 33 TabOrder = 122 TabOrder = 0 34 23 end 35 24 object ButtonSave: TButton 36 Left = 46625 Left = 522 37 26 Height = 25 38 Top = 39427 Top = 457 39 28 Width = 75 40 29 Anchors = [akRight, akBottom] 41 30 Caption = 'Save' 42 31 OnClick = ButtonSaveClick 32 TabOrder = 1 33 end 34 object Panel1: TPanel 35 Left = 0 36 Height = 451 37 Top = 0 38 Width = 608 39 Align = alTop 40 Anchors = [akTop, akLeft, akRight, akBottom] 41 BevelOuter = bvNone 42 ClientHeight = 451 43 ClientWidth = 608 43 44 TabOrder = 2 45 object Splitter1: TSplitter 46 Cursor = crVSplit 47 Left = 0 48 Height = 3 49 Top = 248 50 Width = 608 51 Align = alBottom 52 ResizeAnchor = akBottom 53 end 54 object PanelControls: TPanel 55 Left = 0 56 Height = 248 57 Top = 0 58 Width = 608 59 Align = alClient 60 Anchors = [akLeft, akRight, akBottom] 61 BevelOuter = bvNone 62 TabOrder = 1 63 end 64 object Panel2: TPanel 65 Left = 0 66 Height = 200 67 Top = 251 68 Width = 608 69 Align = alBottom 70 BevelOuter = bvNone 71 ClientHeight = 200 72 ClientWidth = 608 73 TabOrder = 2 74 object TabControl1: TTabControl 75 Left = 0 76 Height = 24 77 Top = 0 78 Width = 608 79 TabStop = False 80 OnChange = TabControl1Change 81 TabIndex = 0 82 Tabs.Strings = ( 83 'Tab1' 84 'Tab2' 85 'Tab3' 86 ) 87 Align = alTop 88 TabOrder = 0 89 end 90 object ListView1: TListView 91 Left = 0 92 Height = 144 93 Top = 24 94 Width = 608 95 Align = alClient 96 Columns = <> 97 OwnerData = True 98 ReadOnly = True 99 RowSelect = True 100 TabOrder = 1 101 ViewStyle = vsReport 102 OnData = ListView1Data 103 OnDblClick = ListView1DblClick 104 OnKeyPress = ListView1KeyPress 105 OnResize = ListView1Resize 106 OnSelectItem = ListView1SelectItem 107 end 108 object Panel3: TPanel 109 Left = 0 110 Height = 32 111 Top = 168 112 Width = 608 113 Align = alBottom 114 BevelOuter = bvNone 115 ClientHeight = 32 116 ClientWidth = 608 117 TabOrder = 2 118 object ButtonAdd: TButton 119 Left = 8 120 Height = 25 121 Top = 6 122 Width = 64 123 Caption = 'Add' 124 OnClick = ButtonAddClick 125 TabOrder = 0 126 end 127 object ButtonDelete: TButton 128 Left = 80 129 Height = 25 130 Top = 6 131 Width = 67 132 Caption = 'Delete' 133 OnClick = ButtonDeleteClick 134 TabOrder = 1 135 end 136 object ButtonView: TButton 137 Left = 156 138 Height = 25 139 Top = 6 140 Width = 64 141 Caption = 'View' 142 OnClick = ButtonViewClick 143 TabOrder = 2 144 end 145 object ButtonEdit: TButton 146 Left = 226 147 Height = 25 148 Top = 6 149 Width = 62 150 Caption = 'Edit' 151 OnClick = ButtonEditClick 152 TabOrder = 3 153 end 154 end 155 end 44 156 end 45 157 end -
trunk/Forms/UItemEdit.lrt
r12 r30 2 2 TITEMEDITFORM.BUTTONCANCEL.CAPTION=Cancel 3 3 TITEMEDITFORM.BUTTONSAVE.CAPTION=Save 4 TITEMEDITFORM.BUTTONADD.CAPTION=Add 5 TITEMEDITFORM.BUTTONDELETE.CAPTION=Delete 6 TITEMEDITFORM.BUTTONVIEW.CAPTION=View 7 TITEMEDITFORM.BUTTONEDIT.CAPTION=Edit -
trunk/Forms/UItemEdit.pas
r22 r30 7 7 uses 8 8 Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, ExtCtrls, 9 StdCtrls, Spin, EditBtn, USqlDatabase, MaskEdit, USystem,9 StdCtrls, Spin, EditBtn, USqlDatabase, MaskEdit, ComCtrls, USystem, 10 10 SpecializedList, SpecializedDictionary; 11 11 … … 15 15 16 16 TItemEditForm = class(TForm) 17 ButtonAdd: TButton; 18 ButtonDelete: TButton; 19 ButtonEdit: TButton; 17 20 ButtonSave: TButton; 18 21 ButtonCancel: TButton; 22 ButtonView: TButton; 23 ListView1: TListView; 19 24 Panel1: TPanel; 25 Panel2: TPanel; 26 Panel3: TPanel; 27 PanelControls: TPanel; 28 Splitter1: TSplitter; 29 TabControl1: TTabControl; 30 procedure ButtonAddClick(Sender: TObject); 20 31 procedure ButtonCancelClick(Sender: TObject); 32 procedure ButtonDeleteClick(Sender: TObject); 33 procedure ButtonEditClick(Sender: TObject); 21 34 procedure ButtonSaveClick(Sender: TObject); 35 procedure ButtonViewClick(Sender: TObject); 22 36 procedure FormClose(Sender: TObject; var CloseAction: TCloseAction); 23 37 procedure FormCreate(Sender: TObject); 24 38 procedure FormDestroy(Sender: TObject); 25 39 procedure FormShow(Sender: TObject); 40 procedure ListView1Data(Sender: TObject; Item: TListItem); 41 procedure ListView1DblClick(Sender: TObject); 42 procedure ListView1KeyPress(Sender: TObject; var Key: char); 43 procedure ListView1Resize(Sender: TObject); 44 procedure ListView1SelectItem(Sender: TObject; Item: TListItem; 45 Selected: Boolean); 46 procedure TabControl1Change(Sender: TObject); 26 47 private 27 { private declarations } 48 SelectedItem: Integer; 49 SubListObject: TChronisObject; 50 TabObjectList: TListInteger; 51 TabDataTypeList: TListObject; 52 procedure LoadSubList; 28 53 public 29 54 Report: TReport; … … 37 62 38 63 uses 39 UMainForm, UDataTypes, UCore ;64 UMainForm, UDataTypes, UCore, UItemAdd, UItemView; 40 65 41 66 {$R *.lfm} … … 47 72 Close; 48 73 end; 74 75 procedure TItemEditForm.ButtonDeleteClick(Sender: TObject); 76 begin 77 if MessageDlg(SItemDeletion, SReallyWantToDelete, mtConfirmation, [mbYes, mbNo], 0) = mrYes then begin 78 79 end; 80 end; 81 82 procedure TItemEditForm.ButtonEditClick(Sender: TObject); 83 begin 84 if Assigned(ListView1.Selected) then 85 ItemEditForm.Show; 86 end; 87 88 procedure TItemEditForm.ButtonAddClick(Sender: TObject); 89 begin 90 if Assigned(ListView1.Selected) then 91 ItemAddForm.Show; 92 end; 93 94 procedure TItemEditForm.ListView1Data(Sender: TObject; Item: TListItem); 95 var 96 I: Integer; 97 begin 98 if Item.Index < Report.Count then 99 with TReportLine(Report[Item.Index]) do begin 100 Item.Caption := Items[0]; 101 for I := 1 to Items.Count - 1 do 102 if not TReportColumn(Report.Columns[I]).VirtualItem then 103 Item.SubItems.Add(Items[I]); 104 end; 105 end; 106 107 procedure TItemEditForm.ListView1DblClick(Sender: TObject); 108 begin 109 if Assigned(ListView1.Selected) then ButtonView.Click; 110 end; 111 112 procedure TItemEditForm.ListView1KeyPress(Sender: TObject; var Key: char); 113 begin 114 if Key = #13 then ButtonView.Click; 115 end; 116 49 117 50 118 procedure TItemEditForm.ButtonSaveClick(Sender: TObject); … … 76 144 end; 77 145 146 procedure TItemEditForm.ButtonViewClick(Sender: TObject); 147 begin 148 if Assigned(ListView1.Selected) then 149 ItemViewForm.Show; 150 end; 151 78 152 procedure TItemEditForm.FormClose(Sender: TObject; var CloseAction: TCloseAction 79 153 ); … … 84 158 procedure TItemEditForm.FormCreate(Sender: TObject); 85 159 begin 160 SubListObject := TChronisObject.Create; 161 SubListObject.Base := Core.System; 86 162 Report := TReport.Create; 87 163 Report.Base := Core.System; 164 TabObjectList := TListInteger.Create; 165 TabDataTypeList := TListObject.Create; 166 TabDataTypeList.OwnsObjects := False; 167 TabControl1.Tabs.Clear; 88 168 end; 89 169 90 170 procedure TItemEditForm.FormDestroy(Sender: TObject); 91 171 begin 172 SubListObject.Free; 92 173 Report.Free; 174 TabObjectList.Free; 175 TabDataTypeList.Free; 93 176 end; 94 177 … … 97 180 MainForm.PersistentForm.Load(Self); 98 181 BuildControls; 182 LoadSubList; 99 183 end; 100 184 … … 106 190 Column: Integer; 107 191 DataType: TDataType; 108 NewControl: T WinControl;109 New Label: TLabel;192 NewControl: TControl; 193 NewWinControl: TWinControl; 110 194 const 111 195 ColumnCount = 2; … … 116 200 IntToStr(MainForm.SelectedItem)); 117 201 118 for I := Panel1.ControlCount - 1 downto 0 do 119 Panel1.Controls[I].Free; 120 202 // Clear previous controls on panel 203 for I := PanelControls.ControlCount - 1 downto 0 do 204 PanelControls.Controls[I].Free; 205 206 TabControl1.Tabs.Clear; 207 TabObjectList.Clear; 208 TabDataTypeList.Clear; 121 209 if Report.Count = 1 then 122 210 for I := 0 to Report.Columns.Count - 1 do 123 211 if (TReportColumn(Report.Columns[I]).ColumnName <> 'Id') then begin 124 125 NewLabel := TLabel.Create(Panel1);126 NewLabel.Parent := Panel1;127 NewLabel.Top := LastTop;128 NewLabel.Left := Column * Width div ColumnCount + 10;129 NewLabel.Caption := TReportColumn(Report.Columns[I]).Caption + ':';130 131 212 DataType := TReportColumn(Report.Columns[I]).CustomType; 132 213 DataType.LoadDef(TReportColumn(Report.Columns[I]).CustomType.CustomType); 133 if not (DataType is TDataTypeRelationMany) then begin 134 NewControl := DataType.CreateControl(Panel1); 214 if DataType is TDataTypeRelationMany then begin 215 TabControl1.Tabs.Add(TReportColumn(Report.Columns[I]).Caption); 216 TabDataTypeList.Add(DataType); 217 TabObjectList.Add(MainForm.SelectedItem); 218 end else begin 219 NewControl := TLabel.Create(Panel1); 220 NewControl.Parent := PanelControls; 221 NewControl.Top := LastTop; 222 NewControl.Left := Column * Width div ColumnCount + 10; 223 TLabel(NewControl).Caption := TReportColumn(Report.Columns[I]).Caption + ':'; 224 225 NewWinControl := DataType.CreateControl(Panel1); 135 226 DataType.Load(TReportLine(Report[0]).Items[I]); 136 DataType.SetupControl(New Control);137 New Control.Parent := Panel1;138 New Control.Top := LastTop;139 New Control.Left := Column * Width div ColumnCount + (Width div ColumnCount) div 2;140 New Control.Width := (Width div ColumnCount) div 2 - 20;141 TReportColumn(Report.Columns[I]).Control := New Control;227 DataType.SetupControl(NewWinControl); 228 NewWinControl.Parent := Panel1; 229 NewWinControl.Top := LastTop; 230 NewWinControl.Left := Column * Width div ColumnCount + (Width div ColumnCount) div 2; 231 NewWinControl.Width := (Width div ColumnCount) div 2 - 20; 232 TReportColumn(Report.Columns[I]).Control := NewWinControl; 142 233 143 234 Column := (Column + 1) mod 2; 144 if Column = 0 then LastTop := LastTop + New Control.Height + 4;235 if Column = 0 then LastTop := LastTop + NewWinControl.Height + 4; 145 236 end; 146 end; 147 end; 237 end; 238 // Panel1; 239 // ListView1; 240 // TabControl1; 241 Panel2.Visible := TabControl1.Tabs.Count > 0; 242 end; 243 244 procedure TItemEditForm.LoadSubList; 245 begin 246 //SelectedObjectId := 0; 247 if (TabControl1.TabIndex >= 0) and (TabControl1.TabIndex < TabControl1.Tabs.Count) then 248 with ListView1 do 249 with TDataTypeRelationMany(TabDataTypeList[TabControl1.TabIndex]) do begin 250 Visible := True; 251 SubListObject.Load(ObjectId); 252 Report.Load(SubListObject, '`' + PropertyName + '`=' + IntToStr(TabObjectList[TabControl1.TabIndex])); 253 254 Report.FillListColumns(Columns); 255 Items.Count := Report.Count; 256 Refresh; 257 end; 258 ListView1Resize(Self); 259 end; 260 261 procedure TItemEditForm.ListView1Resize(Sender: TObject); 262 var 263 I: Integer; 264 begin 265 for I := 0 to ListView1.Columns.Count - 1 do 266 ListView1.Columns[I].Width := ListView1.Width div ListView1.Columns.Count; 267 end; 268 269 procedure TItemEditForm.ListView1SelectItem(Sender: TObject; Item: TListItem; 270 Selected: Boolean); 271 begin 272 if Assigned(ListView1.Selected) then 273 SelectedItem := TReportLine(Report[ListView1.Selected.Index]).Id 274 else SelectedItem := 0; 275 276 ButtonDelete.Enabled := Assigned(ListView1.Selected); 277 ButtonView.Enabled := Assigned(ListView1.Selected); 278 ButtonEdit.Enabled := Assigned(ListView1.Selected); 279 end; 280 281 procedure TItemEditForm.TabControl1Change(Sender: TObject); 282 begin 283 LoadSubList; 284 end; 285 148 286 149 287 end. -
trunk/Forms/UItemView.lfm
r28 r30 59 59 Top = 0 60 60 Width = 620 61 TabStop = False 61 62 OnChange = TabControl1Change 62 63 TabIndex = 0 … … 66 67 'Tab3' 67 68 ) 68 TabStop = False69 69 Align = alTop 70 70 TabOrder = 0 -
trunk/Forms/UItemView.pas
r21 r30 149 149 DataType := TReportColumn(Report.Columns[I]).CustomType; 150 150 DataType.LoadDef(TReportColumn(Report.Columns[I]).CustomType.CustomType); 151 if DataType is TDataTypeRelationMany then begin152 TabControl1.Tabs.Add(TReportColumn(Report.Columns[I]).Caption);153 TabDataTypeList.Add(DataType);154 TabObjectList.Add(MainForm.SelectedItem);155 end else begin156 NewControl := TLabel.Create(PanelControls);157 NewControl.Parent := PanelControls;158 NewControl.Top := LastTop;159 NewControl.Left := Column * Width div ColumnCount + 10;160 TLabel(NewControl).Caption := TReportColumn(Report.Columns[I]).Caption + ':';161 162 NewControl := TLabel.Create(PanelControls);163 NewControl.Parent := PanelControls;164 NewControl.Top := LastTop;165 NewControl.Left := Column * Width div ColumnCount + (Width div ColumnCount) div 2;166 TLabel(NewControl).Caption := TReportLine(Report[0]).Items[I];167 168 Column := (Column + 1) mod 2;169 if Column = 0 then LastTop := LastTop + 24;170 end;151 if DataType is TDataTypeRelationMany then begin 152 TabControl1.Tabs.Add(TReportColumn(Report.Columns[I]).Caption); 153 TabDataTypeList.Add(DataType); 154 TabObjectList.Add(MainForm.SelectedItem); 155 end else begin 156 NewControl := TLabel.Create(PanelControls); 157 NewControl.Parent := PanelControls; 158 NewControl.Top := LastTop; 159 NewControl.Left := Column * Width div ColumnCount + 10; 160 TLabel(NewControl).Caption := TReportColumn(Report.Columns[I]).Caption + ':'; 161 162 NewControl := TLabel.Create(PanelControls); 163 NewControl.Parent := PanelControls; 164 NewControl.Top := LastTop; 165 NewControl.Left := Column * Width div ColumnCount + (Width div ColumnCount) div 2; 166 TLabel(NewControl).Caption := TReportLine(Report[0]).Items[I]; 167 168 Column := (Column + 1) mod 2; 169 if Column = 0 then LastTop := LastTop + 24; 170 end; 171 171 end; 172 172 Panel2.Visible := TabControl1.Tabs.Count > 0; -
trunk/Forms/ULoginForm.lfm
r27 r30 36 36 ModalResult = 11 37 37 OnClick = ButtonCancelClick 38 TabOrder = 038 TabOrder = 5 39 39 end 40 40 object ButtonLogin: TButton … … 47 47 ModalResult = 1 48 48 OnClick = ButtonLoginClick 49 TabOrder = 149 TabOrder = 4 50 50 end 51 51 object EditUserName: TEdit … … 71 71 ItemHeight = 13 72 72 Style = csDropDownList 73 TabOrder = 373 TabOrder = 0 74 74 end 75 75 object ButtonChange: TButton … … 80 80 Caption = 'Change' 81 81 OnClick = ButtonChangeClick 82 TabOrder = 482 TabOrder = 1 83 83 end 84 84 object Image1: TImage … … 95 95 EchoMode = emPassword 96 96 PasswordChar = '*' 97 TabOrder = 597 TabOrder = 3 98 98 end 99 99 end -
trunk/Forms/ULoginForm.pas
r27 r30 62 62 EditUserName.Text := Core.LastUserName; 63 63 EditPassword.Text := ''; 64 EditPassword.SetFocus; 64 65 Core.Profiles.FillStrings(ComboBoxConnection.Items); 65 66 ComboBoxConnection.ItemIndex := Core.LastProfile; -
trunk/Forms/ULoginProfileForm.lfm
r29 r30 3 3 Height = 395 4 4 Top = 147 5 Width = 52 15 Width = 527 6 6 Caption = 'Connection profile' 7 7 ClientHeight = 395 8 ClientWidth = 52 18 ClientWidth = 527 9 9 OnClose = FormClose 10 10 OnCreate = FormCreate … … 13 13 LCLVersion = '0.9.31' 14 14 object LabelServer: TLabel 15 Left = 2 6716 Height = 1 815 Left = 278 16 Height = 14 17 17 Top = 63 18 Width = 4718 Width = 37 19 19 Anchors = [akTop, akRight] 20 20 Caption = 'Server:' … … 22 22 end 23 23 object EditServer: TEdit 24 Left = 3 3925 Height = 2 724 Left = 345 25 Height = 21 26 26 Top = 56 27 27 Width = 178 … … 34 34 Height = 289 35 35 Top = 25 36 Width = 25 036 Width = 256 37 37 Anchors = [akTop, akLeft, akRight, akBottom] 38 38 ItemHeight = 0 … … 40 40 ScrollWidth = 246 41 41 TabOrder = 1 42 TopIndex = -143 42 end 44 43 object ButtonOk: TButton 45 Left = 44 244 Left = 448 46 45 Height = 25 47 46 Top = 362 … … 55 54 object Label1: TLabel 56 55 Left = 10 57 Height = 1 856 Height = 14 58 57 Top = 9 59 Width = 5358 Width = 40 60 59 Caption = 'Profiles:' 61 60 ParentColor = False … … 65 64 Height = 3 66 65 Top = 354 67 Width = 5 0966 Width = 515 68 67 Anchors = [akLeft, akRight, akBottom] 69 68 BevelInner = bvSpace … … 72 71 end 73 72 object SpinEditPort: TSpinEdit 74 Left = 3 3975 Height = 2 773 Left = 345 74 Height = 21 76 75 Top = 84 77 76 Width = 178 … … 82 81 end 83 82 object Label2: TLabel 84 Left = 2 6785 Height = 1 883 Left = 278 84 Height = 14 86 85 Top = 91 87 Width = 3186 Width = 25 88 87 Anchors = [akTop, akRight] 89 88 Caption = 'Port:' … … 91 90 end 92 91 object Label3: TLabel 93 Left = 2 6794 Height = 1 892 Left = 278 93 Height = 14 95 94 Top = 120 96 Width = 5895 Width = 44 97 96 Anchors = [akTop, akRight] 98 97 Caption = 'Protocol:' … … 100 99 end 101 100 object ComboBoxProtocol: TComboBox 102 Left = 3 39103 Height = 2 7101 Left = 345 102 Height = 21 104 103 Top = 113 105 104 Width = 178 106 105 Anchors = [akTop, akRight] 107 ItemHeight = 0106 ItemHeight = 13 108 107 OnChange = ComboBoxProtocolChange 109 108 Style = csDropDownList … … 111 110 end 112 111 object Label4: TLabel 113 Left = 2 67114 Height = 1 8115 Top = 15 4116 Width = 67112 Left = 278 113 Height = 14 114 Top = 152 115 Width = 51 117 116 Anchors = [akTop, akRight] 118 117 Caption = 'Database:' … … 120 119 end 121 120 object EditDatabase: TEdit 122 Left = 3 39123 Height = 2 7121 Left = 345 122 Height = 21 124 123 Top = 145 125 124 Width = 178 … … 149 148 end 150 149 object ButtonCancel: TButton 151 Left = 36 0150 Left = 366 152 151 Height = 25 153 152 Top = 362 … … 159 158 end 160 159 object EditName: TEdit 161 Left = 3 38162 Height = 2 7160 Left = 344 161 Height = 21 163 162 Top = 26 164 163 Width = 179 … … 168 167 end 169 168 object Label5: TLabel 170 Left = 2 67171 Height = 1 8172 Top = 3 2173 Width = 44169 Left = 278 170 Height = 14 171 Top = 33 172 Width = 32 174 173 Anchors = [akTop, akRight] 175 174 Caption = 'Name:' -
trunk/Forms/UMainForm.lfm
r29 r30 6 6 ActiveControl = Panel1 7 7 Caption = 'ChronIS' 8 ClientHeight = 42 18 ClientHeight = 427 9 9 ClientWidth = 640 10 10 Icon.Data = { … … 153 153 object Panel1: TPanel 154 154 Left = 0 155 Height = 42 1155 Height = 427 156 156 Top = 0 157 157 Width = 184 158 158 Align = alLeft 159 159 BevelOuter = bvNone 160 ClientHeight = 42 1160 ClientHeight = 427 161 161 ClientWidth = 184 162 162 TabOrder = 0 163 163 object Label1: TLabel 164 164 Left = 7 165 Height = 1 8165 Height = 14 166 166 Top = 4 167 Width = 51167 Width = 39 168 168 Caption = 'Groups:' 169 169 ParentColor = False … … 171 171 object TreeView1: TTreeView 172 172 Left = 4 173 Height = 397173 Height = 403 174 174 Top = 19 175 175 Width = 180 176 176 Anchors = [akTop, akLeft, akRight, akBottom] 177 DefaultItemHeight = 16 177 178 Images = ImageListActions 178 179 ReadOnly = True … … 184 185 object Panel2: TPanel 185 186 Left = 189 186 Height = 42 1187 Height = 427 187 188 Top = 0 188 189 Width = 451 189 190 Align = alClient 190 191 BevelOuter = bvNone 191 ClientHeight = 42 1192 ClientHeight = 427 192 193 ClientWidth = 451 193 194 TabOrder = 1 194 195 object Label2: TLabel 195 196 Left = 2 196 Height = 1 8197 Height = 14 197 198 Top = 4 198 Width = 54199 Width = 43 199 200 Caption = 'Reports:' 200 201 ParentColor = False … … 202 203 object ListView1: TListView 203 204 Left = 2 204 Height = 3 65205 Height = 371 205 206 Top = 19 206 207 Width = 447 … … 222 223 Left = 3 223 224 Height = 25 224 Top = 39 2225 Top = 398 225 226 Width = 75 226 227 Action = AItemAdd … … 228 229 TabOrder = 1 229 230 end 230 object Button Remove: TButton231 object ButtonDelete: TButton 231 232 Left = 83 232 233 Height = 25 233 Top = 39 2234 Top = 398 234 235 Width = 75 235 236 Action = AItemDelete … … 237 238 TabOrder = 2 238 239 end 240 object ButtonView: TButton 241 Left = 163 242 Height = 25 243 Top = 398 244 Width = 75 245 Action = AItemView 246 Anchors = [akLeft, akBottom] 247 TabOrder = 3 248 end 249 object ButtonEdit: TButton 250 Left = 243 251 Height = 25 252 Top = 398 253 Width = 75 254 Action = AItemEdit 255 Anchors = [akLeft, akBottom] 256 TabOrder = 4 257 end 239 258 end 240 259 object Splitter1: TSplitter 241 260 Left = 184 242 Height = 42 1261 Height = 427 243 262 Top = 0 244 263 Width = 5 … … 252 271 Caption = 'Delete' 253 272 OnExecute = AItemDeleteExecute 273 ShortCut = 16452 254 274 end 255 275 object AItemAdd: TAction … … 257 277 Caption = 'Add' 258 278 OnExecute = AItemAddExecute 279 ShortCut = 16449 259 280 end 260 281 object AItemEdit: TAction … … 262 283 Caption = 'Edit' 263 284 OnExecute = AItemEditExecute 285 ShortCut = 16453 264 286 end 265 287 object AItemView: TAction … … 267 289 Caption = 'View' 268 290 OnExecute = AItemViewExecute 291 ShortCut = 16470 269 292 end 270 293 object AObjectGroupDelete: TAction … … 298 321 Caption = 'Exit' 299 322 OnExecute = AExitExecute 323 ShortCut = 32883 300 324 end 301 325 object AToggleFullscreen: TAction -
trunk/Forms/UMainForm.pas
r29 r30 34 34 AItemDelete: TAction; 35 35 ActionListItem: TActionList; 36 ButtonEdit: TButton; 37 ButtonView: TButton; 36 38 ButtonAdd: TButton; 37 Button Remove: TButton;39 ButtonDelete: TButton; 38 40 ImageListActions: TImageList; 39 41 Label1: TLabel; … … 306 308 LoadTree; 307 309 except 308 on E: Exception do ShowMessage(E.Message);310 on E: Exception do ShowMessage(E.Message); 309 311 end; 310 312 end; … … 371 373 else SelectedItem := 0; 372 374 373 AItemDelete.Enabled := Assigned(ListView1.Selected);374 AItemView.Enabled := Assigned(ListView1.Selected);375 AItemEdit.Enabled := Assigned(ListView1.Selected);375 ButtonDelete.Enabled := Assigned(ListView1.Selected); 376 ButtonView.Enabled := Assigned(ListView1.Selected); 377 ButtonEdit.Enabled := Assigned(ListView1.Selected); 376 378 end; 377 379
Note:
See TracChangeset
for help on using the changeset viewer.