![]() |
Kein Zugriff auf Public eines Frames
Hi,
wenn ich Init Aufrufe, habe ich darauf trotz des Publiceintrags des Frames keinen Zugriff drauf (Undefinierter Bezeichner: 'Init'). Woran könnte das liegen ?
Delphi-Quellcode:
TfrmExp = class(TFrame)
... private { Private-Deklarationen } ... public { Public-Deklarationen } ... procedure Init; end;
Delphi-Quellcode:
var frm : TForm;
exp : TFrame; begin frm := TForm.Create(Self); with frm do begin exp := TfrmExp.Create(frm); with exp do begin --> Init; <-- Parent := frm; Align := alClient; Show; end; Height := 515; Width := 515; Show; end; |
Re: Kein Zugriff auf Public eines Frames
Hallo,
Delphi-Quellcode:
TFrame <> TfrmExp.Create(frm);
var frm : TForm;
exp : TFrame; begin frm := TForm.Create(Self); with frm do begin exp := TfrmExp.Create(frm); Schreibst Du also
Delphi-Quellcode:
gehts
var frm : TForm;
exp : TfrmExp; |
Re: Kein Zugriff auf Public eines Frames
Weil nur der Inhalt der Variable ein TfrmExp ist, der Typ ist aber ein TFrame.
|
Re: Kein Zugriff auf Public eines Frames
Logisch, muss man aber auch erst drauf kommen, danke.
|
Alle Zeitangaben in WEZ +1. Es ist jetzt 19:21 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