Changeset 68 for trunk/Forms
- Timestamp:
- Dec 10, 2021, 11:15:41 AM (3 years ago)
- Location:
- trunk/Forms
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/UFormFindDuplicity.pas
r29 r68 49 49 public 50 50 FoundItems: TFoundItems; 51 ContactField : TContactFieldIndex;51 ContactFieldIndex: TContactFieldIndex; 52 52 procedure Find; 53 53 procedure ReloadList; … … 107 107 108 108 procedure TFormFindDuplicity.SetContacts(AValue: TContacts); 109 var 110 ContactField: TContactField; 109 111 begin 110 112 if FContacts = AValue then Exit; … … 112 114 if Assigned(FContacts) then begin 113 115 Contacts.ContactsFile.Fields.LoadToStrings(ComboBoxField.Items); 114 ComboBoxField.ItemIndex := Integer(ContactField); 116 ContactField := Contacts.ContactsFile.Fields.GetByIndex(ContactFieldIndex); 117 ComboBoxField.ItemIndex := ComboBoxField.Items.IndexOfObject(ContactField); 115 118 if (ComboBoxField.Items.Count > 0) and (ComboBoxField.ItemIndex = -1) then 116 119 ComboBoxField.ItemIndex := 0; … … 133 136 FoundItems.Clear; 134 137 for I := 0 to Contacts.Count - 1 do begin 135 FieldName := TContact(Contacts[I]).Fields[ContactField];138 FieldName := Contacts[I].Fields[ContactFieldIndex]; 136 139 if FieldName <> '' then begin 137 140 Item := FoundItems.SearchByField(FieldName); … … 153 156 Core.Translator.TranslateComponentRecursive(Self); 154 157 Core.ThemeManager1.UseTheme(Self); 155 ContactField := cfTelCell;158 ContactFieldIndex := cfTelCell; 156 159 end; 157 160 158 161 procedure TFormFindDuplicity.ComboBoxFieldChange(Sender: TObject); 159 162 begin 160 ContactField := TContactFieldIndex(ComboBoxField.ItemIndex); 163 if ComboBoxField.ItemIndex <> -1 then 164 ContactFieldIndex := TContactField(ComboBoxField.Items.Objects[ComboBoxField.ItemIndex]).Index 165 else ContactFieldIndex := cfTelCell; 161 166 Find; 162 167 end; -
trunk/Forms/UFormProperty.lfm
r56 r68 95 95 object ComboBoxField: TComboBox 96 96 Left = 168 97 Height = 4 297 Height = 41 98 98 Top = 24 99 99 Width = 532 -
trunk/Forms/UFormProperty.pas
r56 r68 64 64 begin 65 65 if ComboBoxField.ItemIndex <> -1 then begin 66 Field := TContact sFile(Core.DataFile).Fields[ComboBoxField.ItemIndex];66 Field := TContactField(ComboBoxField.Items.Objects[ComboBoxField.ItemIndex]); 67 67 if Assigned(Field) then begin 68 68 EditName.Text := Field.SysName; … … 132 132 GroupsArray); 133 133 if Assigned(Field) then 134 ComboBoxField.ItemIndex := TContactsFile(Core.DataFile).Fields.IndexOf(Field);134 ComboBoxField.ItemIndex := ComboBoxField.Items.IndexOfObject(Field); 135 135 end; 136 136
Note:
See TracChangeset
for help on using the changeset viewer.