Edit style properties

The EditStyle property of a GraphicObjectEditableColumn returns an instance of an EditStyle class. These classes derive from the EditStyleBase class, which holds common methods. The following figure shows the hierarchy of the EditStyle classes.

Figure 6-3: EditStyle class hierarchy

The image shows the classes that inherit from the EditStyle class.

The ScrollableEdit class holds common properties for EditStyle types that contain text and can have scroll bars. The classes in Table 6-3 encapsulate the edit style properties of the GraphicObjectEditableColumnObject.

Table 6-3: Properties for edit styles

Class name

Edit style

CheckBox

CheckBox

DDDW

DropDownDW

DDLB

DropDownListBox

EditMask

EditMask

InkEdit

InkEdit

RadioButton

RadioButtons

SimpleEdit

Edit

For example, the following C# code sets the value of the InkMode and Factoid properties for the column phone, whose edit style is InkEdit:

GraphicObjectEditableColumn phoneCol =
   (GraphicObjectEditableColumn)dwCust.
   GetObjectByName("phone");
if (phoneCol.EditStyle is InkEdit)
{
  ((InkEdit)phoneCol.EditStyle).InkMode =
      InkMode.CollectInk;
  ((InkEdit)phoneCol.EditStyle).Factoid = "TELEPHONE";
}

SpinProperties class

The EditMask edit style can use a spin control. Spin properties are defined in the SpinProperties class. The following example sets and gets an EditMask column’s Minimum, Maximum, and Increment spin properties:

[Visual Basic]
Dim col As GraphicObjectEditableColumn
Dim Min, Max As String
Dim Inc As Short

col = dw1.GetObjectByName("quantity")
CType(col.EditStyle, EditMask).Spin.Minimum = "2"
CType(col.EditStyle, EditMask).Spin.Maximum = "20"
CType(col.EditStyle, EditMask).Spin.Increment = 2
Min = CType(col.EditStyle, EditMask).Spin.Minimum
Max = CType(col.EditStyle, EditMask).Spin.Maximum
Inc = CType(col.EditStyle, EditMask).Spin.Increment
[C#]
GraphicObjectEditableColumn col =
   (GraphicObjectEditableColumn)dw1.
   GetObjectByName("quantity");

String Min, Max;
short Inc;
((EditMask)col.EditStyle).Spin.Minimum = "2";
((EditMask)col.EditStyle).Spin.Maximum = "20";
((EditMask)col.EditStyle).Spin.Increment = 2;
Min=((EditMask)col.EditStyle).Spin.Minimum;
Max=((EditMask)col.EditStyle).Spin.Maximum;
Inc=((EditMask)col.EditStyle).Spin.Increment;