Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   GUI-Design mit VCL / FireMonkey / Common Controls (https://www.delphipraxis.net/18-gui-design-mit-vcl-firemonkey-common-controls/)
-   -   Prism FindComponent für Delphi.NET und WinForms? (https://www.delphipraxis.net/64541-findcomponent-fuer-delphi-net-und-winforms.html)

moritz 4. Mär 2006 23:38


FindComponent für Delphi.NET und WinForms?
 
Moin!

Ich bin auf der Suche nach einer FindComponent-Methode für WinForms, gibt es da etwas äquivalentes? Weder Forum-Suche noch Google haben mir da ne Antwort geben können.

Gruß

Niko 5. Mär 2006 15:25

Re: FindComponent für Delphi.NET und WinForms?
 
Hi,

falls du einen Verweis auf das Control hast, kannst du über die Methode MyForm.Controls.Contains(MyControl) herausbekommen, ob das Control in dem Formular vorhanden ist.

Da du aber wahrscheinlich nur den Namen kennst musst du alle Elemente von MyForm.Controls durchlaufen und jeweils die Name-Eigenschaft überprüfen.


Alle Zeitangaben in WEZ +1. Es ist jetzt 22:06 Uhr.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz