Change listbox column?

I have been looking at this for too long and now have mental block :frowning:

The code below puts the value of a database column called “Title” into column 0 of my single column listbox.
If I now include another column in the listbox - how do I get the value inserted into column 1, instead of column 0??

// POPULATE THE LISTBOX while not rs.eof MainWindow.Listbox1.addRow rs.Field("Title").StringValue rs.moveNext wend

Thank you all in advance.

You can add another parameter to AddRow or

Cell( LastIndex, 1) = ...

Thanks Kem,
Do you mean like this?

// POPULATE THE LISTBOX while not rs.eof Listbox1.AddRow Listbox1.Cell(Listbox1.LastIndex, 1) = rs.Field("Title").StringValue rs.moveNext wend

I can’t actually test it as I am on my iPad, and am just trying to use my time wisely and learn during my train journey :slight_smile:

Yes, or

AddRow "", Title

Wow - I actually combined some code correctly - that must be a first :slight_smile:

Congratulations, Richard. Judging from your attendance on the forum, you have been quite immersed in Xojo lately. It is starting to bear fruits :slight_smile:

Michel - I have mostly been talking complete and utter nonsense in the pet peeve forum, as a distraction after finding my mum dead.
However, I have also been trying to learn as much as possible, and now have a much better grasp of the language.

I have noticed that I seem to be better at the more complex problems than I am with the simple stuff ???
Trust me to be different ! :slight_smile:

Thanks for the kind words.