Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


Delphi Control Array (How do I do it?)

This topic is 6233 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Those of you that have dabbled in VB must know what a control array is, for those of you that haven''t it''s basically an indexed set of like-controls with a common set of event handlers. For instance button[1], button[2], and button[3] would all have a common click event, in which you could determine the index of the pressed button and react accordingly. Is there a way to do this in Delphi? Or is there a way to implement it? I know I can assign a common event handler to each button and check a preset tag value, but that doesn''t give me a way to index the controls. I need to be able to loop through the entire set of buttons each time one is pushed (is there a way to accomplish this?). Any advice would be appreciated. P.S. I heard there was a TControlArray component floating around a while back, but I have yet to run across it. (Anyone know anything about this?)

Share this post

Link to post
Share on other sites
Guest Anonymous Poster
Check out TComponent

start with



/ freeman

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!