Class CadTableLive
- Namespace
- OpenCAD2D
- Assembly
- OpenCAD2D.Core.dll
The rows of a table while a cell of it is typed in, as AutoCAD 2021's in-place editor shows them: the row of the cell grows to hold the lines typed and shrinks back as they are taken out, never below the height it stood at, and the rows under it move with it. It is a preview of the words typed, kept apart from the drawing, which is written once, when the editor closes (Esc writes nothing): the rows RowHeights give are those the words give once written by SetText(CadDocument, string, int, int, string). In AutoCAD's Standard table style (text 4.5, rows 9 high) a cell of data typed with two lines makes its row 15.07 high, with three lines 22.57, with four 30.15; the rows under it stand 6.07, 13.57 and 21.15 lower, and with one line nothing moves.
public sealed class CadTableLive
- Inheritance
-
CadTableLive
- Inherited Members
Remarks
Each key costs the layout of the one cell typed in, not of the table: the other cells of a table drawn by AutoCAD already fit their rows. The table is drawn anew (Items) only while a row differs from what it stands at, and then only when the rows changed since the key before.
Constructors
- CadTableLive(CadDocument, string, int, int)
Starts the preview of a cell of a table typed in, the rows as they stand.
Properties
- ChangesRows
Gets whether a row is other than it stands at: the words typed need more room than the row has.
- Column
Gets the column of the cell typed in, from nought.
- Handle
Gets the table's handle.
- Items
Gets the table drawn at the heights of RowHeights, with the words of the cell typed in left out (the editor shows them); empty while no row differs from what it stands at, when the table in the drawing is drawn as it is.
- Row
Gets the row of the cell typed in, from nought.
- RowHeights
Gets the height of each row once the words typed are written; the heights the rows stand at before any key.
- Version
Gets a count that goes up each time the rows of the preview change, so that a window knows the table is to be drawn again; it does not move for a key that leaves the rows as they were.
Methods
- Shift(int)
Gets how far the point a text of the cell typed in is attached at has moved along the table, in the drawing: the block's top edge for a text attached at the top (1 to 3), its bottom edge at the bottom (7 to 9), the middle of the block between them. Nought while the rows are as they stand.
- Update(string)
Lays the rows out for the words typed so far: the row of the cell is as high as the words need, and no lower than it stood; a block of merged cells across rows grows the rows it spans in proportion to their heights, as writing the words does. Nothing is written to the drawing.