[Table of Contents] [docx version]

VML Reference Material - VML

lock (Shape Protections)

This element specifies locks against actions that can be effected in the UI of an authoring application or programmatically through an object model.

[Example: The following snippet locks the shape's aspect ratio and text from user edits.

<v:shape ... >

<o:lock v:ext="edit" aspectratio="t" text="t"/>

</v:shape>

end example]

Parent Elements

arc6.1.2.1); background2.2.1); curve6.1.2.3); group6.1.2.7); hdrShapeDefaults2.15.1.50); image6.1.2.10); line6.1.2.12); object2.3.3.19); oval6.1.2.13); pict2.3.3.21); pict2.9.23); polyline6.1.2.15); rect6.1.2.16); roundrect6.1.2.17); shape6.1.2.19); shapedefaults6.2.2.27); shapeDefaults2.15.1.79); shapetype6.1.2.20)

 

Attributes

Description

adjusthandles (Handles Lock)

Specifies whether the handles of a shape are locked from being edited. Default is false.

 

The possible values for this attribute are defined by the ST_TrueFalse simple type (§6.2.3.23).

aspectratio (Aspect Ratio Lock)

Specifies whether the aspect ratio of a shape is locked from being edited. Default is false.

 

The possible values for this attribute are defined by the ST_TrueFalse simple type (§6.2.3.23).

cropping (Cropping Lock)

Specifies whether cropping of a shape is locked from being edited. Default is false.

 

The possible values for this attribute are defined by the ST_TrueFalse simple type (§6.2.3.23).

ext (VML Extension Handling Behavior)

 

Namespace: urn:schemas-microsoft-com:vml

Specifies an optional value that indicates how applications that implement VML should interpret extensions not defined as part of the original specification of core VML.

 

[Rationale: This part of the original VML specification is included to assist applications that leverage existing VML support in implementing the Office Open XML Format. end rationale]

 

The possible values for this attribute are defined by the ST_Ext simple type (§6.1.3.3).

grouping (Grouping Lock)

Specifies whether a shape is locked from being grouped. Default is false.

 

The possible values for this attribute are defined by the ST_TrueFalse simple type (§6.2.3.23).

position (Position Lock)

Specifies whether the position of a shape is locked from being edited. Default is false.

 

The possible values for this attribute are defined by the ST_TrueFalse simple type (§6.2.3.23).

rotation (Rotation Lock)

Specifies whether the rotation of a shape is locked from being edited. Default is false.

 

The possible values for this attribute are defined by the ST_TrueFalse simple type (§6.2.3.23).

selection (Selection Lock)

Specifies whether the shape is locked from being selectable in an editor. Default is false.

 

The possible values for this attribute are defined by the ST_TrueFalse simple type (§6.2.3.23).

shapetype (AutoShape Type Lock)

Specifies whether the AutoShape type is locked from being edited. Default is false. If true, the type of an AutoShape cannot be changed in a graphical editor.

 

The possible values for this attribute are defined by the ST_TrueFalse simple type (§6.2.3.23).

text (Text Lock)

Specifies whether the text attached to a shape is locked from being edited. Default is false.

 

The possible values for this attribute are defined by the ST_TrueFalse simple type (§6.2.3.23).

ungrouping (Ungrouping Lock)

Specifies whether a grouped shape is locked from being ungrouped. Default is false.

 

The possible values for this attribute are defined by the ST_TrueFalse simple type (§6.2.3.23).

verticies (Vertices Lock)

Specifies whether the vertices of a path are locked from being edited. Default is false.

 

The possible values for this attribute are defined by the ST_TrueFalse simple type (§6.2.3.23).

The following XML Schema fragment defines the contents of this element:

<complexType name="CT_Lock">

   <attributeGroup ref="v:AG_Ext"/>

   <attribute name="position" type="ST_TrueFalse" use="optional"/>

   <attribute name="selection" type="ST_TrueFalse" use="optional"/>

   <attribute name="grouping" type="ST_TrueFalse" use="optional"/>

   <attribute name="ungrouping" type="ST_TrueFalse" use="optional"/>

   <attribute name="rotation" type="ST_TrueFalse" use="optional"/>

   <attribute name="cropping" type="ST_TrueFalse" use="optional"/>

   <attribute name="verticies" type="ST_TrueFalse" use="optional"/>

   <attribute name="adjusthandles" type="ST_TrueFalse" use="optional"/>

   <attribute name="text" type="ST_TrueFalse" use="optional"/>

   <attribute name="aspectratio" type="ST_TrueFalse" use="optional"/>

   <attribute name="shapetype" type="ST_TrueFalse" use="optional"/>

</complexType>