Back to Devexpress

FormControlCollection Interface

officefileapi-devexpress-dot-spreadsheet-7d99960f.md

latest5.8 KB
Original Source

FormControlCollection Interface

A collection of form controls.

Namespace : DevExpress.Spreadsheet

Assembly : DevExpress.Spreadsheet.v25.2.Core.dll

NuGet Package : DevExpress.Spreadsheet.Core

Declaration

csharp
public interface FormControlCollection :
    ISimpleCollection<FormControl>,
    IEnumerable<FormControl>,
    IEnumerable,
    ICollection
vb
Public Interface FormControlCollection
    Inherits ISimpleCollection(Of FormControl),
             IEnumerable(Of FormControl),
             IEnumerable,
             ICollection

The following members return FormControlCollection objects:

Remarks

Access Form Controls

Use the Worksheet.FormControls property to obtain all form controls contained in a worksheet.

To obtain an individual form control, call the FormControlCollection.GetFormControlsByName or FormControlCollection.GetFormControlById method. The FormControl.Id and FormControl.Name properties return the form control’s identifier and name.

You can also obtain a form control by its index in the collection.

Create Form Controls

The table below lists available form controls and API used to create each type.

Form ControlClassMethod
ButtonButtonFormControlFormControlCollection.AddButton
Check BoxCheckBoxFormControlFormControlCollection.AddCheckBox
Combo boxComboBoxFormControlFormControlCollection.AddComboBox
Group boxGroupBoxFormControlFormControlCollection.AddGroupBox
List boxListBoxFormControlFormControlCollection.AddListBox
Radio ButtonRadioButtonFormControlFormControlCollection.AddRadioButton
ScrollbarScrollbarFormControlFormControlCollection.AddScrollbar
SpinnerSpinnerFormControlFormControlCollection.AddSpinner

Note

The FormControlCollection.Add... method call adds a new item to both FormControlCollection and ShapeCollection.

Available Export Formats

You can export workbooks with form controls to the following formats:

  • XLSX
  • XLSM
  • XLTX
  • XLTM
  • PDF

Disable Printing

Each form control has the PrintObject property that specifies whether to print the form control. This options also affects the form control export to PDF format.

Remove Form Controls

Call the FormControlCollection.Remove or FormControlCollection.RemoveAt method to remove a form control.

The FormControlCollection.Clear() method call removes all form controls from a worksheet.

Limitations

The Form Control API subset ships with the following limitations:

See Also

FormControlCollection Members

DevExpress.Spreadsheet Namespace