Protection class

Protection class

Locking helps prevent inadvertent changes to the shape but does not prevent Microsoft Visio from resetting values in other circumstances. It also does not protect against changes made in the ShapeSheet window.

The Protection type exposes the following members:

Properties

PropertyDescription
lock_widthSpecifies whether the width of the shape is locked so that it remains unchanged when the shape is resized.
lock_heightSpecifies whether the height of the shape is locked. If locked, its height remains unchanged when the shape is resized.
lock_move_xSpecifies whether the horizontal position of the shape is locked so that it cannot be moved horizontally.
lock_move_ySpecifies whether the vertical position of the shape is locked so that it cannot be moved vertically.
lock_aspectSpecifies whether the aspect ratio of the shape is locked. If locked, the shape can only be sized proportionally; it cannot be sized in a single dimension.
lock_deleteSpecifies whether a shape is locked against being deleted.
lock_beginSpecifies whether the begin point of a 1-D shape is locked to a specific location.
lock_endSpecifies whether the end point of a 1-D shape is locked to a specific location.
lock_rotateSpecifies whether the shape is locked against being rotated with the Rotation tool or the Rotate Left or Rotate Right commands in Microsoft Visio.
lock_cropSpecifies whether a foreign object is locked against being cropped with the Crop tool in Microsoft Visio.
lock_vtx_editSpecifies whether the vertices of a shape are locked so that they cannot be edited with any tools on the toolbar.
lock_text_editSpecifies whether the text of a shape is locked so that it cannot be edited. However, the text may still be formatted by applying a style, using the Style options on the Font tab of the Text dialog box.
lock_formatSpecifies whether the formatting of a shape is locked so it cannot be changed. Specifically, this element protects against changing text, line, and fill formatting, or changing which Style element the shape inherits from.
lock_groupSpecifies whether a group is locked so that it cannot be ungrouped.
lock_calc_whSpecifies whether a shape’s selection rectangle is locked so it cannot be recalculated when a vertex is edited or an element type is changed in the Geom element.
lock_selectSpecifies whether a shape’s selection rectangle is locked so it cannot be recalculated when a vertex is edited or an element type is changed in the Geom element.
lock_cust_propDetermines whether the user can add, delete, or modify custom properties in the user interface (UI) by using the Define Custom Properties dialog box.
lock_from_group_formatAllows a subshape to block formatting changes that get applied to a parent group shape in the Visio user interface and would otherwise cascade down to individual group shapes.
lock_theme_colorsPrevents users from applying theme colors to the shape.
lock_theme_effectsPrevents users from applying theme effects to the shape.

See Also