{
Caption example
This example requires a TPageControl populated by several TabSheets, a TEdit and a TButton. When the button is clicked, the caption of the active tab changes to that of the TEdit.
These lines of code could also be written :
PageControl1.ActivePage.Caption := Edit1.Text;
This would obviate the need for a TTabSheet variable since PageControl1.->ActivePage is already of type TTabSheet.
} 
procedure TForm1.Button1Click(Sender: TObject);
var
  TSheet: TTabSheet;
begin
  TSheet := PageControl1.ActivePage;
  TSheet.Caption := Edit1.Text;
end;
 
