Forum: GUI-Design mit VCL / FireMonkey / Common Controls
Delphi
by Phoenix,
16. Aug 2004
Jupp. Das schon, aber wenn die so ähnlich heisst weiss man wenigstens hinterher noch, wofür das Event auch da ist. Ein DoWhatIWant ist zwar nett, aber ob man beim Lesen vom Code ahnt das das ne Caption ändert...? ;-)
Forum: GUI-Design mit VCL / FireMonkey / Common Controls
Delphi
by Phoenix,
16. Aug 2004
Weil dem Event 'OnTitleChange' gar keine Methode zugewiesen wurde (Das ist keine Funktion!).
Du musst also noch das Event machen:
procedure TForm1.OnWebBrowserTitleChange(Sender: TObject; const Text: WideString);
begin
// hier z.B. die Caption ändern
if Sender is TForm then
(Sender as TForm).Caption := Text;
end;