AnnSetNameRestrict method (ILEADRasterAnnotation)
short AnnSetNameRestrict(long hObject, VARIANT_BOOL bNameRestrict, VARIANT_BOOL bSelected); | |
Overview |
Refer to Moving the Name of an Annotation. |
Remarks
(Document/Medical only) Sets a value that determines whether the name of the specified annotation object is restricted. If the name of an annotation object is restricted, the name will fully appear on the bitmap. If the name is not restricted, part of the name may appear on the bitmap while other parts do not.
For example, if the name of an annotation object has been restricted by calling the AnnSetNameRestrict method with the bNameRestrict parameter set to TRUE, the name offset cannot be set so that the object name is outside the bitmap (annotation container). The name offset is set by calling the AnnSetNameOffsetX method and the AnnSetNameOffsetY method. To determine the current offset, call the AnnGetNameOffsetX method and the AnnGetNameOffsetY method.
For example, consider a 200 x 200 bitmap that has a 100 x 100 button in the lower right corner and the name of the button is "Button". Attempting to set the name offset to anything larger than (43,100) will result in the name offset being set to (43,100) anyway. In addition, dragging the annotation object itself in such a way that would cause the object name to be moved outside the bitmap will cause the name offset to change.
The restriction on an object name can be changed by:
1. |
Calling the AnnSetNameRestrict method. |
2. |
Right-clicking the object in design-mode, selecting Name Properties, setting the NameRestrict check box, and clicking "Apply. |
When an object is created in automation mode, the newly created object will have the same name restrictions that the automation object had. That is, if the name of the automation object is restricted, the name of the newly created object is restricted. If the name of the automation object was not restricted, then the name of the newly created object will not be restricted.
If the value of the AnnContainer property is passed as the hObject parameter, the method will modify all the annotations in the container depending on the value of bSelected parameter.
If the value of the AnnAutomation property is passed as the hObject parameter, the method will modify the default values used whenever an annotation is created.
See Also