cell()
Return various positional coordinates of a cell in the filelist, in pixels.
SyntaxCode: Select all
cell(row, column, data, [flag=""])
row a row number where the cell is located. This not limited to the displayed rows, nor availlable screen area.
column title or numeric ID of a column. Column may be inactive or out of visible area.
data type of coordinate or dimension to return.
Vertical and horizontal positions are calculated relative to the left and top edge of display area, respectively.
x x-position. Equivalent to l
y y-position. Equivalent to t
w or width width
h or height height
t or top position of top edge of cell
r or right position of right edge of cell
b or bottom position of bottom edge of cell
l or left position of left edge of cell
flag pass 1 to return position relative to screen. Else app-internal position. This is not effective on w and h.
Return
Return the value of passed
data parameter.
ExampleCode: Select all
text ' w:'.cell(1, "Name", "w").' h:'.cell(1, "Name", "h"); //display width and height of the "Name" column
Code: Select all
$x = cell(6, "Name", "x", 1);
$y = cell(6, "Name", "b", 1);
popupmenu("dummy|menu", $x, $y); //popup a menu on the Name column, and below the name of the 6th list item (the 6th row)
Remarks
In details view mode, each file/folder is displayed in a row, and each row is divided into one or more cells, one for each column.
If
flag is set as 1, then
x,
l,
r positions are relative to left edge of screen display area, and
y,
t,
b positions are relative to top edge of screen display area.
The pararmeter
columnname only accepts column titles, not column IDs. Moreover only factory default columns are accepted
[citation needed]. If the column is inactive, then it's last position in the column layout is used. (this can be verified using this script
::text setcolumns(,3); )
History
See Also