Text List Row, Column and Cell Size


#1

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


#2

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.


#3

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.


#4

You can follow that statement with

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

#5

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


#6

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


#7

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


#8

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.


#9

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