FindComponent

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #51975
    CheshireCat
    Participant

      Hello,

      you mean something like that?

      Code:

      procedure TForm1.sButton1Click(Sender: TObject);
      var
      i : integer;
      begin

      for i := 1 to 4 do
      if FindComponent('sLabelFX' + IntToStr(i)) is TsLabelFX then
      with FindComponent('sLabelFX' + IntToStr(i)) as TsLabelFX do
      Caption := 'My Label ' + IntToStr(i);

      end;

    Viewing 1 post (of 1 total)
    • You must be logged in to reply to this topic.