AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

neue Komponente?

Ein Thema von heiopei · begonnen am 31. Jan 2003 · letzter Beitrag vom 1. Feb 2003
 
Daniel B
(Gast)

n/a Beiträge
 
#13
  Alt 1. Feb 2003, 20:23
Du bist schon a bisserl Faul?!
1. Suche benutzen, dies wurde schon sehr oft besprochen.
2. Sagt die OH folgendes dazu:
Delphi-Quellcode:
Indicates whether a given component is owned by the component.

function FindComponent(const AName: string): TComponent;

Description

FindComponent returns the component in the Components property array with the name that matches the string in the AName parameter. Use FindComponent to determine whether a given component is owned by another.
Delphi-Quellcode:
The following example creates 20 edit boxes, using FindComponent with the edit box name to access each newly created edit box.

procedure TForm1.Button1Click(Sender: TObject);

var
  i: Integer;
const
  NamePrefix = 'MyEdit';
begin
  for i := 1 to 20 do begin
    TEdit.Create(Self).Name := NamePrefix + IntToStr(i);
    with TEdit(FindComponent(NamePrefix + IntToStr(i))) do
    begin
      Left := 10;
      Top := i * 20;
      Parent := self;
    end;
  end;
end;
Grüsse, Daniel
  Mit Zitat antworten Zitat
 


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 03:28 Uhr.
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz