Closed Thread
Results 1 to 2 of 2

Thread: How to tell what number a component is....

  1. #1
    2710 is offline Programmer
    Join Date
    Sep 2008
    Posts
    108
    Rep Power
    0

    How to tell what number a component is....

    Sorry again

    I just want to ask a quick question:

    How do you know what Component number one item is. Like label 7, how do you know? I tried looking but couldn't find it. I also tried logic lol, as in, the 10th one on the list (to the left of delphi) would be the 10th component. But its not, as I tested it.

    Thanks

  2. CODECALL Circuit advertisement
    Join Date
    Always
    Posts
    Many

     
  3. #2
    Join Date
    Jul 2006
    Posts
    16,491
    Blog Entries
    75
    Rep Power
    143

    Re: How to tell what number a component is....

    Code:
    unit Unit3;
    
    interface
    
    uses
      Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
      StdCtrls;
    
    type
      TForm1 = class(TForm)
        Label1: TLabel;
        Edit1: TEdit;
        Edit2: TEdit;
        Label2: TLabel;
        Edit3: TEdit;
        Label3: TLabel;
        Edit4: TEdit;
        Label4: TLabel;
        Button1: TButton;
        procedure Button1Click(Sender: TObject);
      private
        { Private declarations }
      public
        { Public declarations }
      end;
    
    var
      Form1: TForm1;
    
    implementation
    
    {$R *.DFM}
    
    procedure TForm1.Button1Click(Sender: TObject);
    var
      count : integer;
    begin
      for count:= 0 to (Componentcount-1) do
      begin
        showmessage('component['+inttostr(count)+'] = ' + Components[count].name );
      end
    
    end;
    
    end.
    Programming is a branch of mathematics.
    My CodeCall Blog | My Personal Blog

Closed Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Problem with my own component
    By jaiii in forum C and C++
    Replies: 0
    Last Post: 05-21-2010, 01:03 AM
  2. Passing on component name
    By Deathblake in forum C# Programming
    Replies: 1
    Last Post: 02-25-2010, 08:55 PM
  3. Topcoder component
    By selvaa89 in forum Java Help
    Replies: 3
    Last Post: 02-07-2010, 09:54 AM
  4. How to make a component
    By ikkeugh in forum Visual Basic Programming
    Replies: 2
    Last Post: 10-04-2007, 08:26 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts