Selecting row programatically in result table

results-table
macro
Tags: #<Tag:0x00007fb87b685e08> #<Tag:0x00007fb87b685cc8>

#1

Is it possible to select a row or scroll programmatically in result table? I have a very large table that a user will update using some custom macros in which I use “setResult”. After setResult, the table will scroll down to the bottom. I would like to show instead the modified line by scrolling back there and selecting it.


#2

Dear @Alexandre_Bastien,

You mean using the ImageJ1.x macro language? I guess that is not possible. You could use a proper scripting language like Groovy to do something like this (not tested!):

textPanel = IJ.getTextPanel();
textPanel.setSelection(0, 10);

Inspired by the TextPanel Javadoc.

Best,
Stefan