By changing the values, you can manage the table and fill in data from your own program modules

You can see how this is done in the table editor file LABPP_Table_unicode.cpp.


TS_Cells_poscode - content codes in table cells.

Text array 500x100

The code shows information about the contents of the cell.


The first 4 characters are responsible for the presence of a cell section on each of the 4 sides.

LTRB - means that all borders are there.

If there is _ at some position, then the cell is merged along this side.

An adjacent cell must have the same character on the side of the mates.

For example, if two cells at indexes [2][1] and [3][1] (in the 1st column in rows 2 and 3) are merged, then the top one will have:

LTR_ and at the bottom L_RB.


Position 5 is responsible for the direction of the text.

Spacebar - horizontal.

'a' - the text is rotated 90 degrees.


Position 6 is responsible for the style of the text in the cell.

't', 'h', 's', 'n' - style of table title, heading, subheading or plain text.


7th position - format code 0-text, 1 - integer, 2 - number with 1 digit, 3 - number with 2 digits.


8th position - l/m/f/r horizontal alignment left/center/right/justify

9th position - t/m/b - vertical alignment up/middle/down


Positions 10,11,12,13 - cell line type - left/top/right/bottom -> 0/1/2 - no/bold/thin


default

LTRB n0mm1111


TS_Cells_value - values ​​in cells.

Text array 500x100


TS_Cells_macro - codes for drawing macros in table cells

Text array 500x100



TS_ColumnsUsedCount - number of columns in the table.

TS_RowsUsedCount - number of rows in the table.


TS_RowsH - array of column heights.

TS_ColumnsW - array of column widths.


TS_ShowSelection - show or not cell selection.


After changing the data, you must set the TS_DoRecalcAll variable to 1.

In this case, the table element will recalculate service variables.


From the following service variables, you can get a real picture of the LABPP_Table element at the current moment.

TS_RealCells - real calculated picture of all cells

An array of type linear length N x 17.

The table is flat, the values ​​for the cells go one after another from left to right from top to bottom.

Those. the first 17 elements are the first row of the table, the second 17 elements are the second row of the table, and so on. by the number of cells involved.


Position Assignment

1-SX

2-SY

3 - EX

4-EY

5 - I - column number

6 - J - line number

7 - starting position of the text

8 - text end position

9 - left border no/yes

10 - upper limit no/yes

11 - right border no/yes

12 - lower limit no/yes

13 - number of positions down combined

14 - number of positions to the right combined

15 - leftmost no/yes

16 - topmost no/yes

17-selected


TS_RealCellsSelected - array of selected cells.

Calculated from position 17 of TS_RealCells

To set the selected cells, you need to set the 17th position for the corresponding cell elements in the TS_RealCells field.

Be aware that once the table is recalculated, the selected cell information is reset as in spreadsheets.