Einzelnen Beitrag anzeigen

lkz633

Registriert seit: 9. Jun 2002
Ort: Aachen
221 Beiträge
 
#4

Re: Komponenten-Entwcilung: xyz[i].name

  Alt 17. Jan 2004, 15:41
Hallo, das letzte soll auch ein record sein, habe es so mal hinbekommen(alles unwichtige weggelassen):

Code:
type tcontactitem = class
  private
    Fname: string;
    procedure Setname(const Value: string);
  public
  property name: string read Fname write Setname;
end;

type tContactItemList = class(TList)
  private
    function GetItems(Index: Integer): tcontactitem;
    procedure SetItems(Index: Integer; const Value: tcontactitem);
  public
    property Items[Index : Integer]: tcontactitem read GetItems write SetItems;
end;

type
  Toutextract = class(TComponent)
  private
    FOutlookVersion: outlookversion;
    Fcontacts: TContactItemList;
    procedure getcontacts;
    procedure Setcontacts(const Value: TContactItemList);
    { Private-Deklarationen }
  protected
    { Protected-Deklarationen }
  public
    constructor create(AOwner: TComponent); override;
    destructor destroy;
    property contacts: TContactItemList read Fcontacts write Setcontacts;
  end;
Jetzt greife ich aber darauf zu mit outextract1.contacts.Items[1].name, ich will aber direkt outextract1.contacts[1].name, wie bekomme ich das denn hin?

Herzlichen Dank
lkz633
  Mit Zitat antworten Zitat