How do I Select a Row or Check if a Row is Selected?

How do I deal with Selected Row(s) with API2 ?

This does not works:
If Me.SelectedRowIndex(Sel_Idx) Then

image

Edit:
I searched either visually and “Selected” in the documentation for: DesktopListBox and found nothing related.

RowSelectedAt() is what you are looking for :slight_smile:

2 Likes

Thank you Sascha, I came back to add that it may be a Method !

I needed a third reading to discover it.

My first guess was… SelectedRowAt …

PS: is it a bad idea to read the [LOCAL] documentation from the current Xojo ?

PPS: I pasted a line of code and after a run, that line was changed / transformed to garbage (Tahoe 26.0.1).
Is there’s troubles of this kind with that version and Xojo ?

i always search at the online help first for the Class

then at top i look at the Properties, Methods, Events

Not AFAIK

Why ? You do not use Xojo 2025r2.1 (the current version ) ?

There is no more “Changes.html” where to read about the last changes in the Documentation. That is something missing from the wiki documentation times.

So, I download the documentation when a new Xojo comes and read it from [LOCAL]. Most of the times I do not have internet handly when I use Xojo.

@PPS above.
I updated to 26.0.1, and after the installation and the reboot, I fired Xojo.

I already made a shut down / a reboot, but I do not fired Xojo (yet), so I do not know if it was “temporary” or… something else.

I just saw that i forgot to add an example…:


Label1.Text = If ( Me.RowSelectedAt(Me.SelectedRowIndex), "Selected Row =" + Str(Me.SelectedRowIndex+1), "No selection" )

Search for ‘Release Notes’.

Example: Xojo 2025r2.1 Release Notes — Xojo documentation

Thank you Robin.

I saw the example in the documentation, but only NoSelection (as in the RN).

I left the project yesterday; be back by tomorrow (maybe)… tons of changes to set.