Array Listbox - On Display Detail

It looks like an array based listbox does not receive the “On Display Detail” event?
So, “Displayed line number” does not work.
Is there a way to know what line is currently being written to the screen?

Thanks,
Keith

It always has. Do you have on display detail checked on the object

Regards
Chuck

Records displayed in a selection based boxes are loaded-as-needed. In addition, the columns can have dynamic values, like a formula. So it makes sense to dynamically compute the cell value, style, colour, background, hidden status during the “On Display Detail” event.

By contrast, array based boxes are static; the value, style, colour, background, hidden status never change unless you manipulate their respective backend arrays.

What do you want to do with the Display line number? For instance, if you want to alternate appearance for even/odd lines, you can configure the styles when building the array and that will be enough.

Alternatively, you could consider a collection based box. That way, you have access to meta expression and This.

I was going to refresh a displayed array value based on the contents of a field.
I was going to see if only the displayed lines would get the event, and then
execute code on $a_State{Displayed line number}.
It’s an old app getting a little improvement in an existing form.
The dataset is small enough to rebuild all of the arrays when only the one field really needs to be updated in this case.
It’s been enough time since using an array base LB that I forgot it is different than the other LB choices.

Thanks,
Keith

In that case, yes, you have to update the array elements that correspond to the updated record. It is the same if the data set were large. It would useful, therefore, to have a hidden “index” column (record number, primary key…) that allows you to “Find in (sorted) array”.