Autor Beitrag
GerhardS
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 49



BeitragVerfasst: Mo 26.07.10 00:55 
Hallo,
wie erkenne ich, welcher Frame aktiv ist?
In meiner Anwendung habe ich zwei Frames, die so aufgerufen werden:
ausblenden Quelltext
1:
2:
3:
4:
if FFrame <> nil then FFrame.Free;
FFrame := TFrame2.Create(Panel1);
FFrame.Align := alClient;
FFrame.Parent := Panel1;

Für den anderen Frame wird TFrame2.Create(Panel1) geändert in TFrame3.Create(Panel1).
Beim Speichern muss ich jedoch zwischen den Frames unterscheiden. Wie bekomme ich das hin?
jaenicke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 19326
Erhaltene Danke: 1749

W11 x64 (Chrome, Edge)
Delphi 12 Pro, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
BeitragVerfasst: Mo 26.07.10 05:52 
Meinst du vielleicht das?
ausblenden Delphi-Quelltext
1:
2:
if FFrame is TFrame2 then
  TFrame2(FFrame). ...
GerhardS Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 49



BeitragVerfasst: Mo 26.07.10 23:04 
Ja, so geht's. Danke.
elundril
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 3747
Erhaltene Danke: 123

Windows Vista, Ubuntu
Delphi 7 PE "Codename: Aurora", Eclipse Ganymede
BeitragVerfasst: Di 27.07.10 02:31 
Könntest du nicht einfach die den Frames eine Methode verpassend die das speichern irgendwie dann übernimmt? Wäre doch rein von der OOP-Idee schöner.

lg elundril

_________________
This Signature-Space is intentionally left blank.
Bei Beschwerden, bitte den Beschwerdebutton (gekennzeichnet mit PN) verwenden.