Partager via


FormControlProperties Class

Defines the FormControlProperties Class. It is the root element of ControlPropertiesPart.When the object is serialized out as xml, its qualified name is x14:formControlPr.

Inheritance Hierarchy

System.Object
  DocumentFormat.OpenXml.OpenXmlElement
    DocumentFormat.OpenXml.OpenXmlCompositeElement
      DocumentFormat.OpenXml.OpenXmlPartRootElement
        DocumentFormat.OpenXml.Office2010.Excel.FormControlProperties

Namespace:  DocumentFormat.OpenXml.Office2010.Excel
Assembly:  DocumentFormat.OpenXml (in DocumentFormat.OpenXml.dll)

Syntax

'Declaration
<ChildElementInfoAttribute(GetType(ListItems), FileFormatVersions.Office2010)> _
<ChildElementInfoAttribute(GetType(ExtensionList), FileFormatVersions.Office2010)> _
<OfficeAvailabilityAttribute(FileFormatVersions.Office2010)> _
Public Class FormControlProperties _
    Inherits OpenXmlPartRootElement
'Usage
Dim instance As FormControlProperties
[ChildElementInfoAttribute(typeof(ListItems), FileFormatVersions.Office2010)]
[ChildElementInfoAttribute(typeof(ExtensionList), FileFormatVersions.Office2010)]
[OfficeAvailabilityAttribute(FileFormatVersions.Office2010)]
public class FormControlProperties : OpenXmlPartRootElement

Remarks

The following table lists the possible child types:

  • ListItems <x14:itemLst>

  • ExtensionList <x14:extLst>

2.4.29 formControlPr

Target namespace: https://schemas.microsoft.com/office/spreadsheetml/2010/main

A CT_FormControlPr element that specifies properties of form control objects. This element is the root element of the Control Properties part.

The following W3C XML Schema ([XMLSCHEMA1] section 2.1) fragment specifies the contents of this element.

<xsd:element name="formControlPr" type="CT_FormControlPr"/>

See section 5.3 for the full W3C XML Schema ([XMLSCHEMA1] section 2.1).

2.6.59 CT_FormControlPr

Target namespace: https://schemas.microsoft.com/office/spreadsheetml/2010/main

Referenced by: formControlPr

A complex type that stores a form control embedded object’s properties*.*

Attributes:

objectType : An ST_ObjectType attribute that specifies the form control object type.

checked : An ST_Checked attribute that specifies whether a checkbox is checked or a radio button is selected.

dropLines : An unsignedInt ([XMLSCHEMA2] section 3.3.22) attribute that specifies the number of lines in the dropdown before scrollbars are added. This attribute only applies to dropdown form controls. This value MUST be at least 0 and at most 30000<42>.

dropStyle : An ST_DropStyle attribute that specifies the style of the dropdown. This attribute only applies to dropdown form control objects<43>.

dx : An unsignedInt ([XMLSCHEMA2] section 3.3.22) attribute that specifies the width of the scroll bar in pixels. This attribute only applies to list box and dropdown form controls<44>.

firstButton : A boolean ([XMLSCHEMA2] section 3.2.2) attribute that specifies whether the object is the first button in a set of radio buttons. This attribute only applies to radio button form controls.

fmlaGroup : An attribute that specifies the cell an object in a group box is linked to. This attribute overrides the FmlaLink attribute for any radio buttons within a group box. This attribute only applies to group box form controls. The application can chose to remove and not save this element and use the FmlaLink attribute of the first radio button in the group. It MUST be a cell reference (see [ISO/IEC-29500-1] section 18.17.2.3).

fmlaLink : An attribute that specifies the cell the object is linked to. It MUST be a cell reference (see [ISO/IEC-29500-1] section 18.17.2.3). This attribute only applies to checkboxes, radio buttons, scroll bars, spinners, dropdowns<45> and list boxes. The value in the linked cell and the index of the selected item in the object are linked together. This link is ignored if the form control allows multiple selections.

fmlaRange : An attribute that specifies the range of source data cells. It MUST be a cell reference (see [ISO/IEC-29500-1] section 18.17.2.3). This is used to populate a list box or a dropdown form control. This attribute only applies to list box and dropdown form controls.

fmlaTxbx : A cell reference attribute (see [ISO/IEC-29500-1] section 18.17.2.3) that links the form control object to the data defined in the cell reference. Any cell range may be specified but only the first cell in the range is considered<46>.

horiz : A boolean ([XMLSCHEMA2] section 3.2.2) attribute that specifies that the scroll bar is horizontal. This attribute only applies to scroll bar form controls.

inc : An unsignedInt ([XMLSCHEMA2] section 3.3.22) attribute that specifies the number of lines to move the scroll bar on an increment click. If present, it MUST be at least 0 and at most 30000. This attribute applies only to scroll bar form controls.

justLastX : A boolean ([XMLSCHEMA2] section 3.2.2) attribute that specifies if the last line in text is justified when in a Far East alignment<47>.

max : An unsignedInt ([XMLSCHEMA2] section 3.3.22) attribute that specifies the maximum value generated by the scroll bar (when scrolled all the way down) or by the spinner. It MUST be at least 0 and at most 30000. This attribute only applies to scroll bars and spinners.

min : An unsignedInt ([XMLSCHEMA2] section 3.3.22) attribute that specifies the minimum value generated by the scroll bar (when scrolled all the way up) or by the spinner. It MUST be at least 0 and at most 30000. This attribute only applies to scroll bars and spinners.

noThreeD : A boolean ([XMLSCHEMA2] section 3.2.2) attribute that specifies that 3D effects are disabled. This element is used for checkoxes, radio buttons, group boxes, scroll bars, dropdowns, list boxes and spinners<48>.

noThreeD2 : A boolean ([XMLSCHEMA2] section 3.2.2) attribute that specifies that 3D effects are disabled. This element is used for dropdowns and list boxes<49>.

page : An unsignedInt ([XMLSCHEMA2] section 3.3.22) attribute that specifies the number of items to move the scroll bar or spinner on a page click. It MUST be at least 0 and at most 30000<50>.

sel : An unsignedInt ([XMLSCHEMA2] section 3.3.22) attribute that specifies the index of the selected item. The list indexes are 1-based. If set to a value of 0 no items are selected. This attribute applies only to list box and dropdown form controls <51>.

seltype : An ST_SelType attribute that specifies the selection type for the list box. This attribute applies only to list box form controls.

textHAlign : An ST_TextHAlign attribute that specifies the horizontal text alignment for the object<52>.

textVAlign : An ST_TextVAlign attribute that specifies the vertical text alignment for the object<53>.

val : An unsignedInt ([XMLSCHEMA2] section 3.3.22) attribute that specifies the number of top rows currently hidden in the scroll bar. If omitted, the value is assumed to be 0. Those rows are hidden but still accessible by clicking on the scroll bar buttons. The number of top hidden rows can change as the user interacts with the scroll bar. This attribute only applies to scroll bar, spinner and dropdown form controls <54>.

widthMin : An unsignedInt ([XMLSCHEMA2] section 3.3.22) attribute that specifies the smallest width allowed for the dropdown box window in screen pixels. This attribute only applies for dropdown form controls.

editVal : An ST_EditValidation attribute that specifies how the edit box content should be validated if the application chooses to validate it. This attribute only applies to edit box form controls.

multiLine : A boolean ([XMLSCHEMA2] section 3.2.2) attribute that specifies that the form control is multiline. This attribute only applies to edit box form controls. This attribute only works when the form control is in a running dialog window.

verticalBar : A boolean ([XMLSCHEMA2] section 3.2.2) attribute that specifies that the control has a vertical scroll bar. This attribute only applies to edit box form controls. This attribute only works when the form control is in a running dialog window.

passwordEdit : A boolean ([XMLSCHEMA2] section 3.2.2) attribute that specifies if the edit box control stores password. In this case the control will display * for every character on it. This attribute only applies to edit box form controls. This attribute only works when the control is in a running dialog window.

The following W3C XML Schema ([XMLSCHEMA1] section 2.1) fragment specifies the contents of this complex type.

<xsd:complexType name="CT_FormControlPr">

<xsd:attribute name="objectType" type="ST_ObjectType" use="optional"/>

<xsd:attribute name="checked" type="ST_Checked" use="optional"/>

<xsd:attribute name="dropLines" type="xsd:unsignedInt" use="optional" default="8"/>

<xsd:attribute name="dropStyle" type="ST_DropStyle" use="optional"/>

<xsd:attribute name="dx" type="xsd:unsignedInt" use="optional" default="80"/>

<xsd:attribute name="firstButton" type="xsd:boolean" use="optional" default="false"/>

<xsd:attribute name="fmlaGroup" type="x:ST_Formula" use="optional"/>

<xsd:attribute name="fmlaLink" type="x:ST_Formula" use="optional"/>

<xsd:attribute name="fmlaRange" type="x:ST_Formula" use="optional"/>

<xsd:attribute name="fmlaTxbx" type="x:ST_Formula" use="optional"/>

<xsd:attribute name="horiz" type="xsd:boolean" use="optional" default="false"/>

<xsd:attribute name="inc" type="xsd:unsignedInt" use="optional" default="1"/>

<xsd:attribute name="justLastX" type="xsd:boolean" use="optional" default="false"/>

<xsd:attribute name="max" type="xsd:unsignedInt" use="optional"/>

<xsd:attribute name="min" type="xsd:unsignedInt" use="optional" default="0"/>

<xsd:attribute name="noThreeD" type="xsd:boolean" use="optional" default="false"/>

<xsd:attribute name="noThreeD2" type="xsd:boolean" use="optional" default="false"/>

<xsd:attribute name="page" type="xsd:unsignedInt" use="optional"/>

<xsd:attribute name="sel" type="xsd:unsignedInt" use="optional"/>

<xsd:attribute name="seltype" type="ST_SelType" use="optional" default="single"/>

<xsd:attribute name="textHAlign" type="ST_TextHAlign" use="optional" default="left"/>

<xsd:attribute name="textVAlign" type="ST_TextVAlign" use="optional" default="top"/>

<xsd:attribute name="val" type="xsd:unsignedInt" use="optional"/>

<xsd:attribute name="widthMin" type="xsd:unsignedInt" use="optional"/>

<xsd:attribute name="editVal" type="ST_EditValidation" use="optional"/>

<xsd:attribute name="multiLine" type="xsd:boolean" use="optional" default="false"/>

<xsd:attribute name="verticalBar" type="xsd:boolean" use="optional" default="false"/>

<xsd:attribute name="passwordEdit" type="xsd:boolean" use="optional" default="false"/>

</xsd:complexType>

See section 5.3 for the full W3C XML Schema ([XMLSCHEMA1] section 2.1).

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

FormControlProperties Members

DocumentFormat.OpenXml.Office2010.Excel Namespace