Board index » delphi » Please someone help me with FindComponent function

Please someone help me with FindComponent function

Hi you evryone...
I need help with findcomponent function
it returns a TComponent and i want to acces my class
how can i do it?
Please someone help me
 

Re:Please someone help me with FindComponent function


This should help

procedure TForm1.Saveall1Click(Sender: TObject);

var
  Loop            : integer;
  CurrentTabSheet : TTabSheet;
  TabSheet        : TComponent;

begin
  CurrentTabSheet := PageControl1.ActivePage;
  for Loop := 1 to PageControl1.PageCount do
  begin
    TabSheet := FindComponent('TabSheet' + IntToStr(Loop));
    Form1.PageControl1.ActivePage := (TabSheet as TTabSheet);
    Save1Click(Sender);
  end;
  PageControl1.ActivePage := CurrentTabSheet
end;

Quote
Vainer Vladimir <vvai...@ort.org.il> wrote in message

news:7gks4m$880$1@news.netvision.net.il...
Quote
> Hi you evryone...
> I need help with findcomponent function
> it returns a TComponent and i want to acces my class
> how can i do it?
> Please someone help me

Other Threads