![]() |
eben noch gar net weil es eben nicht funzt*g*
Code:
gruß christoph
Undeclared identifier: 'FindComponent'
|
Stop! Du musst "FindComponent" doch irgendwo eingebaut haben, wenn du die Fehlermeldung
Code:
bekommst...
Undeclared identifier: 'FindComponent'
|
ich hab davon ja keine ahnung. es wäre nett wenn du mir dazu mal ein beispiel posten könntest!
(ich dachte halt so:
Code:
)
TShape(FindComponent(sh_line));
Christoph |
Nö. Das müsste du so machen (Ich schätze du willst überprüfen ob es eine Komponente auf dem Form gibt, die ein Shape ist, oder):
Delphi-Quellcode:
Das ist ein Code von Mr. Spock vom 23.4.03 (Suche!! :wink: )
var
i: Integer; begin for i := 0 to ComponentCount -1 do if Components[i] is TShape then (Components[i] as TShape).Text := ''; end; Dabei werden alle komponenten auf dem Form durchlaufen, es wird überprüft ob es ein Shape ist, und wenn, weird es gelöscht. Man liest sich, Stanlay 8) |
ich bekomme diese fehlermeldungen
Code:
hat das vielleicht was mit meiner delphi version zu tun?
[Error] U_funktionen.pas(441): Undeclared identifier: 'ComponentCount'
[Error] U_funktionen.pas(442): Undeclared identifier: 'Components' [Error] U_funktionen.pas(442): Operator not applicable to this operand type [Error] U_funktionen.pas(443): Operator not applicable to this operand type [Error] U_funktionen.pas(443): Statement expected, but expression of type 'String' found MFG Christoph |
Du meinst eine Komponente die a) ein Shape ist und b) den Namen z.B. Shape1 hat?
begin IF FindComponent('Shape1') is TShape THEN FreeandNil(Shape1); end; Allerding muss die Komponente dann bereits zur Designzeit vorhanden sein. Du musst vorher die Unit ExtCtrls einbinden, weil er sonst TShape irgendwie nicht erkennt. Meinst du sowas? Poste mal den Code. |
hast du die entsprechenden units eingebunden?
gruss haegar |
Das sind die Unit die ich eingebunden habe:
Code:
Ich will eine Komponente die zur Laufzeit erstellt worden ist löschen!
uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, Buttons, ComCtrls, ToolWin, ExtCtrls, TeeProcs, TeEngine, Chart, Menus, Series, inifiles; |
Alle Zeitangaben in WEZ +1. Es ist jetzt 01:12 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 by Thomas Breitkreuz