Class CadTableDrag
- Namespace
- OpenCAD2D
- Assembly
- OpenCAD2D.Core.dll
A drag of a grip of a table, as AutoCAD 2021 drags them: a line between columns or rows, a stretch grip of the whole table, or the autofill grip of cells. Update(GeoPoint2, bool) follows the cursor and says what the drag will make, the new line, the new outline, the cells to fill and their values, and a tip; Commit() makes it, one undo step ("Column Width", "Row Height", "Table Size" or "Autofill"); dropped, it changes nothing.
public sealed class CadTableDrag
- Inheritance
-
CadTableDrag
- Inherited Members
Remarks
The line between columns C and D of a table, C 30 wide and D 22.5, dragged 8 to the right makes C 38 and D 14.5, the table's width kept; with Ctrl, or from a cell's edge grip, C alone grows and the columns right of it move along. No column goes narrower than MinimumColumnWidth(DxfTable, int) nor a row lower than its text needs: the line stops there though the cursor goes on. The left (or top) edge of the first column (or row) moves the table along with it. A 1 in A3 whose autofill grip is dragged down into A6 previews 2, 3 and 4 in A4 to A6, as Fill Series fills.
Fields
- FillSeries
The fill an autofill makes unless another is chosen: Fill Series, a series in the look of the source.
Properties
- Changing
Gets the number of the column (or row) whose size the tip gives, from nought: the one left of (or above) the line dragged, the first where the line is the table's left (or top) edge; -1 for another kind of drag.
- FillOptions
Gets or sets how an autofill fills, as the right-click menu of the drag chooses it: FillSeries by default, a series alone for Fill Series Without Formatting, the content and the format for Copy Cells, the content alone without formatting, the format alone for Fill Formatting Only. Along the rows and Reverse are added by the way the grip is dragged, right or left, up or left.
- FillRange
Gets the cells an autofill would fill: the source's width (or height) from its edge to the cell under the cursor; null where it would fill none.
- Handle
Gets the handle of the table.
- Heights
Gets the heights of the rows as the drag would leave them.
- IsFirstEdge
Gets whether the line dragged is the table's left (or top) edge, which moves the table along with it.
- Kind
Gets what the drag changes.
- Line
Gets the two ends of the line dragged, where the drag would leave it, across the whole table, the top (or left) first; null for a stretch or an autofill.
- Outline
Gets the corners of the table as a stretch would leave it, the top left first, then about it; null for a drag of another kind.
- Source
Gets the cells the autofill grip was dragged from.
- Tip
Gets the tip the drag shows by the cursor: "C width = 38.00" or "Row 4 height = 12.00" to the drawing's LUPREC, the table's new size for a stretch, the value of the cell farthest from the source for an autofill; null for none.
- Values
Gets the cells an autofill would fill and what each would hold; empty where none.
- Widths
Gets the widths of the columns as the drag would leave them.
Methods
- Autofill(CadDocument, string, DxfCellRange)
Starts a drag of the autofill grip of cells selected.
- Column(CadDocument, string, int, bool)
Starts a drag of a line of columns:
line0 is the table's left edge, 1 the line right of column A, and the number of columns its right edge. A column grip of the whole table drags a line inside it, the table's width kept unless Ctrl is held; a cell's edge grip changes the column left of the line alone.
- Commit()
Makes the drag: one undo step; nothing written where it changes nothing.
- FromGrip(CadDocument, string, int)
Starts the drag a grip of a whole table makes, as Of(DxfEntity) gives them: a column grip, or a stretch grip; null for the move grip, which moves the table as any base grip does, the table breaking grip, which is not offered, and a grip of anything else.
- Row(CadDocument, string, int)
Starts a drag of a line of rows by a cell's top or bottom edge grip:
line0 is the table's top edge, 1 the line under row 1, and the number of rows its bottom edge; the row above the line changes alone.
- Size(CadDocument, string, bool, bool)
Starts a drag of a stretch grip of a table: its width, its height, or both.
- TypeSize(double)
Takes a typed size, as the field of dynamic input does: the column (or row) the tip names made that wide (or high), held at its least, the line moved by as much.
- Update(GeoPoint2, bool)
Follows the cursor: what the drag would make with the grip let go there.