Changeset 34 for trunk/Forms/UFormContacts.pas
- Timestamp:
- Nov 25, 2021, 1:51:20 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/UFormContacts.pas
r32 r34 27 27 MenuItem4: TMenuItem; 28 28 PopupMenuContact: TPopupMenu; 29 StatusBar1: TStatusBar; 29 30 ToolBar1: TToolBar; 30 31 ToolButton1: TToolButton; … … 70 71 SRemoveContacts = 'Remove contacts'; 71 72 SRemoveContactsQuery = 'Do you want to remove selected contacts?'; 73 STotal = 'Total'; 74 SFiltered = 'Filtered'; 75 SSelected = 'Selected'; 72 76 73 77 { TFormContacts } … … 83 87 Item.SubItems.Add(Fields[cfTelCell]); 84 88 Item.SubItems.Add(Fields[cfTelHome]); 85 Item.Data := Contacts[Item.Index];89 Item.Data := ListViewSort1.List[Item.Index]; 86 90 end; 87 91 end; … … 101 105 begin 102 106 ReloadList; 107 UpdateInterface; 103 108 end; 104 109 … … 244 249 begin 245 250 ListView1.SelectAll; 251 UpdateInterface; 246 252 end; 247 253 … … 263 269 264 270 procedure TFormContacts.UpdateInterface; 271 var 272 Text: string; 273 SelectedCount: Integer; 265 274 begin 266 275 AAdd.Enabled := Assigned(Contacts); 267 276 AModify.Enabled := Assigned(Contacts) and Assigned(ListView1.Selected); 268 277 ARemove.Enabled := Assigned(Contacts) and Assigned(ListView1.Selected); 278 279 Text := ''; 280 if Assigned(Contacts) then begin 281 Text := STotal + ': ' + IntToStr(Contacts.Count); 282 if ListView1.Items.Count < Contacts.Count then 283 Text := Text + ', ' + SFiltered + ': ' + IntToStr(ListView1.Items.Count); 284 SelectedCount := ListView1.SelCount; 285 if SelectedCount > 0 then 286 Text := Text + ', ' + SSelected + ': ' + IntToStr(SelectedCount); 287 end; 288 StatusBar1.Panels[0].Text := Text; 269 289 end; 270 290
Note:
See TracChangeset
for help on using the changeset viewer.