Contents Previous Next Subchapters

Determining Which Cells Are Selected In A Table
Syntax getcells(caption)
See Also addtable , gettable , setcells

Description
Returns a four-element integer row vector that specifies the currently selected block of cells in the table specified by the character row vector caption. The returned vector has the same structure as the .blk operator; that is, [row start, column start, number of rows, number of columns]

Example
If you enter
     caption      = "My Table"
     geometry     = [100, 100, 200, 120]
     callback     = "delwin(caption);"
     data         = seq(3) * seq(2)'
     columnLabels = novalue
     rowLabels    = novalue
     style        = "normal"
     addtable(caption, geometry, callback, ...
          data, columnLabels, rowLabels, style)
O-Matrix will create a table window with two columns and three rows. If you then use the mouse to highlight the first column and at the command line you enter
     getcells(caption)
O-Matrix will reply
     [ 1  , 1 , 3 , 1 ]
You can delete the table window from its caption bar or by entering
     delwin(caption);