|
We iterate through each of the fields. For each field we focus
on the field. We then color the rectangle light gray and draw the
name of the field in dark red.
[C#]
string[] theNames = theDoc.Form.GetFieldNames();
foreach (string theName in theNames) {
Field theField = theDoc.Form[theName];
theField.Focus();
theDoc.Color.String = "240 240 255";
theDoc.FillRect();
theDoc.Rect.Height = 16;
theDoc.Color.String = "220 0 0";
theDoc.AddText(theField.Name);
theDoc.Delete(theField.ID);
}
[Visual Basic]
Dim theNames As String() = theDoc.Form.GetFieldNames()
Dim theName As String
For Each theName In theNames
Dim theField As Field = theDoc.Form(theName)
theField.Focus()
theDoc.Color.String = "240 240 255"
theDoc.FillRect()
theDoc.Rect.Height = 16
theDoc.Color.String = "220 0 0"
theDoc.AddText(theField.Name)
theDoc.Delete(theField.ID)
Next
|