• DR-IT Software
  • Products
  • Documentation
  • Product page
  • Examples
  • API reference
  • Support
Show / Hide Table of Contents

Class FieldAppearance

Controls the visual appearance of a form field widget. Call Refresh() to mark that an appearance should be generated; then Get() returns a non-null token usable as a guard in flatten logic. Supports per-trigger caption text (Normal/Rollover/Down) for full appearance state coverage (spec §12.7.4.4, /AP sub-dictionaries).

Inheritance
object
FieldAppearance
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
Namespace: DRIT.Pdf.Forms
Assembly: DRIT.Pdf.dll
Syntax
public sealed class FieldAppearance

Properties

BackgroundColor

The background colour of the field widget (spec §12.7.4.4, /MK /BC).

Declaration
public PdfColor? BackgroundColor { get; set; }
Property Value
Type Description
PdfColor?

BorderColor

The border color for fields that draw a visible border (e.g. text fields with CombOfCharacters > 0).

Declaration
public PdfColor? BorderColor { get; set; }
Property Value
Type Description
PdfColor?

Label

The display label for a push button (written to /MK /CA). This is a shortcut for GetLabel(ButtonAppearanceTrigger)(Normal) and SetLabel(ButtonAppearanceTrigger, string?)(Normal, value).

Declaration
public string? Label { get; set; }
Property Value
Type Description
string

Methods

Get()

Returns a non-null token when an appearance is available (i.e. after Refresh()), or null if no appearance has been prepared.

Declaration
public FieldAppearance? Get()
Returns
Type Description
FieldAppearance

GetLabel(ButtonAppearanceTrigger)

Gets the caption text for the specified appearance trigger.

Declaration
public string? GetLabel(ButtonAppearanceTrigger trigger)
Parameters
Type Name Description
ButtonAppearanceTrigger trigger

The appearance trigger (Normal, Rollover, or Down).

Returns
Type Description
string

The caption text, or null when none is set.

Refresh()

Mark that an appearance needs to be (or has been) refreshed. After calling this, Get() will return a non-null object.

Declaration
public void Refresh()

SetLabel(ButtonAppearanceTrigger, string?)

Sets the caption text for the specified appearance trigger.

Declaration
public void SetLabel(ButtonAppearanceTrigger trigger, string? label)
Parameters
Type Name Description
ButtonAppearanceTrigger trigger

The appearance trigger (Normal, Rollover, or Down).

string label

The caption text, or null to clear.

Back to top

DR-IT Software documentation

DR-IT Software · Products · Documentation index · Product page · Downloads · Support · Licensing

Generated by DocFX