ComboBox(Dropdown) values from Match in StringGrid

I have a form with a ComboBox and a StringGrid. The stringgrid gets populated from an INIFile. When a user clicks on a Combobox, the entries from the first column (a file name) is placed in the combobox. The second StringGrid part of the grid is a path string. I need to append this path, with the new value listed in Combox Box. So if I need to launch the file, the path is found, plus the name of the file is added. I have tried this but it fails:
(ListGrid.Cells[0,I] = ComboBox1.Text)

Any Ideas?
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Give us a code sample, please !!
The line fails (I assume to compile) because there is a syntax error:

ListGrid.Cells[0,I] = ComboBox1.Text

should be

ListGrid.Cells[0,I] := ComboBox1.Text;

Your description is hard to understand...

Does that help? If not can you describe in more detail what the problem is...


routerboy309Author Commented:
I left off the ; sorry. Here is a cut and paste of portions:

from the INI File,


and is read/stored in the StringGrid here:

from the ShowForm of the EXE:

 for J := 0 to RowCount + (Rowcount + 1) do
         for K := 0 to Colcount + (ColCount + 10) do
            Cells[J, K] := IniFile.ReadString(ListGrid.Name, Format('Cell%d-%d', [J,K]), '');

Then from the ComboBox, I use:

 with MainForm.ListGrid do begin

to populate the ComboBox.

Click on the ComboBox, and the DropDown fires getting the value of Column 0, passing it to the Combox Box like a list.

Now that the ComboBox has the value (in this case - Test.exe), I need to append that value, with the path that is listed in the correct part of the string grid. This is what I don't understand how to do.

I have a button that will run the exe. I plan on doing a shellexecute (and I have a sample of that code.) So I need to get an sample of how to get the value of the path, added to the first column. How this helps?
Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

Is this what you mean:

ThePathIWant := ListGrid.Cells[1, ComboBox.ItemIndex]+'\'+ComboBox.Text;



Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
I agree with Raymond.

You don't say whether you are a beginner or not. Sometimes it will help if you do so..

Text property of a TComboBox can be retrieved when you set the Style property to csDropDown but not csDropDownList.
If you set the Style property to csDropDownList, you can use AComboBox.Items.Strings[AComboBox.ItemIndex] to get the selected text.
routerboy309Author Commented:
I don't concider myself a beginner, not certainly not an expert (maybe above beginner, and almost in the range of intermediate). Thanks for the help. It work as I needed.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.