Table of Contents

Constructor CadPropertyRow

Namespace
OpenCAD2D
Assembly
OpenCAD2D.Core.dll

CadPropertyRow(string, string, bool)

Makes a row.

public CadPropertyRow(string label, string value, bool isReadOnly)

Parameters

label string

The label.

value string

The value as text; "Varies" where the selected entities differ.

isReadOnly bool

Whether the value cannot be edited.

CadPropertyRow(string, string, bool, IReadOnlyList<string>)

Makes a row whose value is one of a list, as the Justify row of an MTEXT offers Top left to Bottom right.

public CadPropertyRow(string label, string value, bool isReadOnly, IReadOnlyList<string> choices)

Parameters

label string

The label.

value string

The value as text; "Varies" where the selected entities differ.

isReadOnly bool

Whether the value cannot be edited.

choices IReadOnlyList<string>

The values the row offers, in the order of AutoCAD's drop-down; null for a row typed into.

CadPropertyRow(string, string, Func<string, string>, IReadOnlyList<string>)

Makes a row that an extension gives the Properties panel and that can be changed: typed into, or one of a list where choices are given. The panel calls setter with the text typed or chosen, as it does for its own rows, when Enter is pressed, the box is left or a choice is made.

public CadPropertyRow(string label, string value, Func<string, string> setter, IReadOnlyList<string> choices = null)

Parameters

label string

The label.

value string

The value as text.

setter Func<string, string>

What changes the value: it is given the text, and returns null where the change was made, else the words that say why it was refused, which the panel writes on the command line while the row goes back to its value.

choices IReadOnlyList<string>

The values the row offers, in order; null for a row typed into.

Exceptions

ArgumentNullException

Thrown when the label or the setter is null.