FMX.AddressBook.TCustomAddressBook.AllContactsInGroup
Delphi
procedure AllContactsInGroup(const AGroup: TAddressBookGroup; var AContacts: TAddressBookContacts);
C++
void __fastcall AllContactsInGroup(TAddressBookGroup* const AGroup, TAddressBookContacts* &AContacts);
Inhaltsverzeichnis
Eigenschaften
Typ | Sichtbarkeit | Quelle | Unit | Übergeordnet |
---|---|---|---|---|
procedure function |
public | FMX.AddressBook.pas FMX.AddressBook.hpp |
FMX.AddressBook | TCustomAddressBook |
Beschreibung
Ruft eine Liste aller Kontakte ab, die zu der angegebenen Gruppe gehören.
Mit dieser Methode rufen Sie eine Liste aller Kontakte aus der angegebenen Gruppe AGroup
ab.
Beispiele
Sehen Sie sich zur Klärung die folgenden Beispiele an. Diese Codefragmente illustrieren, wie alle Kontakte aus der angegebenen Gruppe aufgelistet werden.
Delphi:
var
GroupContacts: TAddressBookContacts;
Group: TAddressBookGroup;
i: Integer;
s: String;
begin
// The Group object should be defined earlier
GroupContacts := TAddressBookContacts.Create;
try
// Get all contacts from the Group group
AddressBook1.AllContactsInGroup(Group, GroupContacts);
s := 'Contacts from the ' + Group.Name + ' group:' + sLineBreak;
for i := 0 to GroupContacts.Count - 1 do
s := s + GroupContacts.Items[i].DisplayName + sLineBreak;
ShowMessage(s);
finally
GroupContacts.Free;
end;
end;
C++Builder:
TAddressBookGroup *Group;
TAddressBookContacts *GroupContacts;
int i;
// The Group object should be defined earlier
GroupContacts = new TAddressBookContacts();
__try {
// Get all contacts from the Group group.
AddressBook1->AllContactsInGroup(Group, GroupContacts);
UnicodeString s = "Contacts from the " + Group->Name + " group:" +
sLineBreak;
for (i = 0; i < GroupContacts->Count; i++) {
s = s + GroupContacts->Items[i]->DisplayName + sLineBreak;
}
ShowMessage(s);
}
__finally {
GroupContacts->Free();
}
Weitere Informationen und Beispiele finden Sie unter Mobile-Tutorial: Verwenden einer Adressbuch-Komponente (iOS und Android).