Einzelnen Beitrag anzeigen

Benutzerbild von Die Muhkuh
Die Muhkuh

Registriert seit: 21. Aug 2003
7.332 Beiträge
 
Delphi 2009 Professional
 
#2

Re: Auf aktives MDI-Child zugriffen

  Alt 27. Jan 2005, 14:39
Hi,

entweder:

Delphi-Quellcode:
if ActiveMDIChild is TMDIForm then
  TMDIForm(ActiveMDIChild).Button1.Caption := 'Test';
oder:

Delphi-Quellcode:
function GetMDIForm: TMDIForm;
begin
  Result := TMDIForm(ActiveMDIChild);
end;

// eine Procedure:

GetMDIForm.Button1.Caption := 'Test2';
Wobei ich die zweite Variante besser finde
  Mit Zitat antworten Zitat