How to highlight record in Text List Object?

I wonder if there is a way to highlight a record programmatically in a text list? I do not want to use the database navigator, but instead I want to use a variable to display and refresh the list. Is there a way to highlight in the text list the current record in the database? My text list contains an array element that contains the record number matching the current record.

Look up Text List Database Integration in Help. You want to check Database Navigation in the properties of the Text List.

The reason I don’t want to use Database Navigation is because the test list object does not automatically refresh when values are changed in the database. I like using a variable to display the list because a variable is easy to refresh programatically.

It updates for me, so I am not certain what the problem is.

If you’re not using Database Navigator, that means that there is a field or variable specified for the Data option for the Text List. To highlight a particular list item, you need to set that field or variable to the value corresponding to that list item. If it is a variable, you also need to use the showvariables statement.

To make the row you want visible, if it isn’t showing in the window, you can use an undocumented statement that will scroll the text list so that the row you have found is visible:

objectaction [TextListName],"scrolltorow",[row#]

I’m trying to have a procedure activate a Text List, then highlight a specific line within it. objectaction does it but without any visual evidence that it’s occurred. Visually the Text List looks untouched, or may have a previously highlighted line still looking as if it is the selected line of the list.

I’ve tried a number of approaches, including those I would have used in Pan 6, but all without success.

If you are able to actually change the selection it should have also changed the variable used for the selected data and a showvariables with that variable name should update the display. I assume it is more complex than this simple assumption and I’m just not seeing the whole picture.

In a text list populated by an array, I was able to get a selected row number to show up as highlighted, provided the row was less than 900. (My text list has >4700 rows).

The code that does this is

objectaction "text list object name","open"
objectaction "text list object name","scrolltorow",500
[selected text value variable]=array([array displayed in text list],501,cr())
showvariables [selected text value variable]

I found above row 900 that the scrolltorow feature does not work reliably.