Text List Row, Column and Cell Size

Is there a way to get the rectangle dimensions of a clicked cell and the row size in a text list object?

It has not been documented, and I haven’t tested this, but you should be able to get the dimensions with this code.

local dimensions
objectaction info("clickedobjectid"),"cellrectangle",info("matrixrow"),info("matrixcolumn"),dimensions

The dimensions variable will contain a rectangle in window coordinates.

Hi Jim,

This seems to work but no matter how much I read, and reread the documentation about rectangles it seems I just don’t quite get it. How do I change the rectangle from window to form coordinates?..assuming thats what I need to do. What I am trying to do is move a text object over the clicked cell in a Text List Object or a matrix cell.

You can follow that statement with

dimensions = xytoxy(dimensions,"w","f")

Exactly what I was hoping for. Now I need to study it so I can understand it. Thank you Jim and Dave.

One more question. How would you move the rectangle to the next row or column of a List or Matrix Object?

Sorry, but I have no idea what you mean by “move the rectangle to the next row or column.”

I have a Text List Object and a Matrix Object that has multiple columns and rows. I am using a Text Editor Object to edit the data that is being displayed by the Text List and the Matrix. It works wonderfully for 1 click editing, in other words, if I click on the cell the Text Editor moves over it, grabs the value from the array and allows me to edit the value. I am wanting a way to move the Text Editor Object to the next cell in the Text List or the Matrix. It would be similar to the data sheet.

That’s a pretty major project, if it is possible at all.