Mirror the selected Row of a ListBox in a TextField?

In a window with a ListBox, I add a TextField to be able to mirror the ListBox’s Selected Row.

Then, I want to be able to - eventually - modify the TextField contents, then Copy it to the Clipboard…

Must I loop thru all Cells to get the Row Contents ?

Of course, I forget how I ws doing that with the previous Xojo.

When the selection in the DesktopListBox changes, just copy the SelectedRowValue into the Text Property of the Textfield. Or in case of a MultiColumn DesktopListBox, copy the CellTextAt Value of the row with the SelectedRowIndex.

But if you want to copy the content of multiple columns of a single row in a TextField, i think you are correct. You will need to go through those columns.

I think in API1 it was possible to copy the content of a whole list, row and column with a single Method. But i forgot how. :thinking:

BTW: In the Docs is written “Passing -1 as the row or column parameters will refer to the entire row or column.”, but ListBox.CellTextAt(0, -1) just gives an OOB Exception… :man_shrugging:

Thank you Sasha.

It was…

ListBox.CellTextAt(0, -1
There is an enum (I think) that have to be used something like ListBoxAllRows… but either I do not found the right word or it does not worked.

After spending sometimes with the documentation, I realized that I will never found it and stopped looking.