Changeset 43 for trunk/Forms/UFormItemList.pas
- Timestamp:
- Mar 9, 2012, 1:09:52 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/UFormItemList.pas
r42 r43 7 7 uses 8 8 Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls, 9 ComCtrls, ActnList, USystem;9 ComCtrls, ActnList, Menus, USystem; 10 10 11 11 type … … 15 15 TItemListForm = class(TForm) 16 16 AClose: TAction; 17 AItemClone: TAction; 17 18 AItemView: TAction; 18 19 AItemEdit: TAction; … … 20 21 AItemDelete: TAction; 21 22 ActionList1: TActionList; 22 ButtonClose: TButton;23 ButtonAdd: TButton;24 ButtonDelete: TButton;25 ButtonEdit: TButton;26 ButtonView: TButton;27 23 ListView1: TListView; 24 MenuItem1: TMenuItem; 25 MenuItem2: TMenuItem; 26 MenuItem3: TMenuItem; 27 MenuItem4: TMenuItem; 28 MenuItem5: TMenuItem; 29 PopupMenu1: TPopupMenu; 30 ToolBar1: TToolBar; 31 ToolButton1: TToolButton; 32 ToolButton2: TToolButton; 33 ToolButton3: TToolButton; 34 ToolButton4: TToolButton; 35 ToolButton5: TToolButton; 28 36 procedure ACloseExecute(Sender: TObject); 29 37 procedure AItemAddExecute(Sender: TObject); … … 46 54 SelectedItem: Integer; 47 55 procedure Reload; 56 procedure UpdateInterface; 48 57 end; 49 58 … … 76 85 ListView1Resize(Self); 77 86 ListView1SelectItem(Self, nil, False); 87 end; 88 89 procedure TItemListForm.UpdateInterface; 90 var 91 I: Integer; 92 begin 93 AItemDelete.Enabled := Assigned(ListView1.Selected); 94 AItemView.Enabled := Assigned(ListView1.Selected); 95 AItemEdit.Enabled := Assigned(ListView1.Selected); 96 AItemClone.Enabled := Assigned(ListView1.Selected); 97 98 for I := 0 to ToolBar1.ButtonCount - 1 do 99 ToolBar1.Buttons[I].Hint := ToolBar1.Buttons[I].Caption; 78 100 end; 79 101 … … 191 213 Selected: Boolean); 192 214 begin 193 ButtonDelete.Enabled := Assigned(ListView1.Selected); 194 ButtonView.Enabled := Assigned(ListView1.Selected); 195 ButtonEdit.Enabled := Assigned(ListView1.Selected); 215 UpdateInterface; 196 216 end; 197 217
Note:
See TracChangeset
for help on using the changeset viewer.