March 4th, 2004, 12:52 AM
Array of ComboBoxes Delphi 7
Hi. I've searched quite hard on Google for the answer to my problem, with no avail. I'm hoping one of you code kids can help me.
My problem is that I'd like to create an array of Combo Boxes (ComboBox, ComboBox.. ComboBox) for a program I'm writing. I had assumed that copying and pasting a combobox on the form would have presented me with the question "Do you want to create an array of this object?" or something. But it didn't. I seem to remember this happening for me before in some Visual language. I thought it was in Delphi, but perhaps not.
So my question is: is there any way of making this happen in Delphi 7, or is it simply not possible?
Thanks in advance.
Comments on this post
March 4th, 2004, 12:50 PM
I am not sure if the RAD GUI has this feature (I am using an older version). But creating an array of checkboxes is simple:
myCheckboxArray: array of TCheckBox;
for i:=0 to 10 do begin
March 4th, 2004, 03:03 PM
You might want to tell us what you intend to use that array of checkboxes for. For example, if you want to assign them all to use the same event handler, there is a Delphi way to do the same thing.
Up the Irons
What Would Jimi Do? Smash amps. Burn guitar. Take the groupies home.
"Death Before Dishonour, my Friends!!" - Bruce D ickinson, Iron Maiden Aug 20, 2005 @ OzzFest
Down with Sharon Osbourne
"I wouldn't hire a butcher to fix my car. I also wouldn't hire a marketing firm to build my website." - Nilpo
March 4th, 2004, 11:14 PM
Thanks for your replies so far
I haven't tried M.Hirsch's suggestion yet, as I'm only just replying here. What I am attempting to do is to write a program that allows the creation and editing of a data file of drivers and teams for an offline GP4 league. So I need 22 combo boxes each from which I can select one of maybe 40 drivers. The drivers are looked up from a unique driver number, and other boxes should be filled with info (driver name, performance or grip values etc) from the combo box selection event.
I'm rusty with programming, and this is my attempt to get back on top of it.