If that works for you than why do you need a search method? I thought you 
needed to find each one based on dynamically changing criteria. That's the 
problem with only posting a snippet of what you're trying to accomplish. 

   In answer to your question as to its practicality, I extensively used this 
technique for my apps user customization form, where I searched the form (in 
OnClose event) to find component tag values that had been set, then used the 
name with that value to write the changes to an ini file. That way I had a way 
of cancelling the changes if the user changed their mind about the 
modifications to the app.

Dave

Martin Wynne <[EMAIL PROTECTED]> wrote:                               Hi,
 
 > This ought to work a little better for you:
   > 
   > For X:=0 to Form1.ComponentCount-1 do
   > If Form1.Components[X] is TSpeedbutton then
   > If (Form1.Components[X] as TSpeedbutton).Name = 'SpdBtn' +
 IntToStr(I) then
   >        Case I of
   >       1: SpdBtn1.Caption := Strlist[0];
   >       2: SpdBtn2.Caption := Strlist[1];
   > etc....
 
 I might be missing something, but how does that differ from
 simply doing:
 
 with Form1 do begin
   SpdBtn1.Caption := Strlist[0];
   SpdBtn2.Caption := Strlist[1];
   etc....
 
 ?
 
 Martin.
 
 
     
                               

       
---------------------------------
Be a better friend, newshound, and know-it-all with Yahoo! Mobile.  Try it now.

[Non-text portions of this message have been removed]

Reply via email to