[Table of Contents] [docx version]

VML Reference Material - VML

h (Shape Handle)

This element defines a single handle, which is a user interface element tied to one or two adj values. Moving the handle changes its linked adj values, which in turn changes formulas and attributes that depend on them. The handle is optionally constrained vertically or horizontally. The linked adj values store the position of the handle in the shape's coordinate space.

[Example: The example below defines a simple kite shape with a resizable width:

<v:shape coordsize="200,200" coordorigin="-100,-100" adj="100" style="width:50;height:50;position:relative"

path="m @1,-50 l 0,-200 @0,-50 0,200 x e">

<v:formulas>

<v:f eqn="val #0"/>

<v:f eqn="sum 0 0 @0"/>

</v:formulas>

<v:handles>

<v:h position="#0,0"/>

</v:handles>

</v:shape>

end example]

Parent Elements

handles6.1.2.9)

 

Attributes

Description

invx (Invert Handle's X Position)

Specifies whether the x position of the handle should be inverted according to:

 

Default is false.

 

[Example:

 

<v:handles>

<v:h ... invx="true" ... />

</v:handles>

 

end example]

 

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

invy (Invert Handle's Y Position)

Specifies whether the y position of the handle should be inverted according to:

 

Default is false.

 

[Example:

 

<v:handles>

<v:h ... invy="true" ... />

</v:handles>

 

end example]

 

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

map (Handle Coordinate Mapping)

Specifies how the x and y positions of the handle are mapped from the coordsize range into the specified range. Default is "0,1000".

 

[Example:

 

<v:handles>

<v:h ... map="-1000,1000" ... />

</v:handles>

 

end example]

 

The possible values for this attribute are defined by the XML Schema string datatype.

polar (Handle Polar Center)

Specifies the center position of a handle that uses polar coordinates. If specified, the position attribute is assumed to contain radius and angle values. If omitted, the position attribute is assumed to contain x and y positions. Default is no value.

 

[Example:

 

<v:handles>

<v:h ... polar="0,0" ... />

</v:handles>

 

end example]

 

The possible values for this attribute are defined by the XML Schema string datatype.

position (Handle Position)

Specifies the x and y position of the handle. If the polar attribute is present, defines the handle position using radius and angle values. Default is "0,0".

 

Each value in the vector is one of the following:

constant

formula (e.g., @2)

adj value (e.g., #2)

center

topleft

bottomright

 

Each of the above except for an adj value reference fixes the handle position for that dimension. Specifying an adj value allows the handle to move in that dimension and the handle position for that dimension is stored in the adj value.

 

[Example: The handle's x position is fixed but it is free to move in the y dimension:

 

<v:handles>

<v:h ... position="topleft,#2" ... />

</v:handles>

 

end example]

 

The possible values for this attribute are defined by the XML Schema string datatype.

radiusrange (Handle Polar Radius Range)

Specifies a range of minimum and maximum values that constrain the radius of a handle using polar coordinates. Default is "0,0". Each value is either a constant or a formula reference. Omitting a value leaves that bound unconstrained.

 

[Example: The polar handle may only be moved within a radius range of 25 to 50.

 

<v:handles>

<v:h ... radiusrange="25,50" ... />

</v:handles>

 

end example]

 

The possible values for this attribute are defined by the XML Schema string datatype.

switch (Handle Inversion Toggle)

Specifies whether the x and y dimensions of the handle are switched when the shape is taller than it is wide. Default is false. This is useful for shapes with limo stretch behavior.

 

[Example:

 

<v:handles>

<v:h ... switch="true" ... />

</v:handles>

 

end example]

 

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

xrange (Handle X Position Range)

Specifies a range of minimum and maximum values that constrain the x position of a handle. Default is "0,0". Each value is either a constant or a formula reference. Omitting a value leaves that bound unconstrained.

 

[Example: The handle's x position has a maximum bound of 500 and no minimum bound:

 

<v:handles>

<v:h ... xrange=",500" ... />

</v:handles>

 

end example]

 

The possible values for this attribute are defined by the XML Schema string datatype.

yrange (Handle Y Position Range)

Specifies a range of minimum and maximum values that constrain the y position of a handle. Default is "0,0". Each value is either a constant or a formula reference. Omitting a value leaves that bound unconstrained.

 

[Example: The handle's y position has a minimum bound of -500 and no maximum bound:

 

<v:handles>

<v:h ... yrange="-500," ... />

</v:handles>

 

end example]

 

The possible values for this attribute are defined by the XML Schema string datatype.

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

<complexType name="CT_H">

   <attribute name="position" type="xsd:string"/>

   <attribute name="polar" type="xsd:string"/>

   <attribute name="map" type="xsd:string"/>

   <attribute name="invx" type="ST_TrueFalse"/>

   <attribute name="invy" type="ST_TrueFalse"/>

   <attribute name="switch" type="ST_TrueFalseBlank"/>

   <attribute name="xrange" type="xsd:string"/>

   <attribute name="yrange" type="xsd:string"/>

   <attribute name="radiusrange" type="xsd:string"/>

</complexType>