OBJSetProtect sets or clears different attributes for diagrams and drawing objects.
Return Value
If the function succeeds, the return value bool is TRUE (1); otherwise it is FALSE (0).
Parameters
hobj identifies a line, text, rectangle, ellipse or layer (diagram) object.
nProtect is a combination of the following attributes:
| Value | Meaning |
|---|---|
| BL_FULLCONTROL | switch off all attributes |
| BL_NOEDIT | The object can’t be double-clicked |
| BL_NOSIZE | The object size can’t be changed |
| BL_NOPOS | The object position can’t be changed |
| BL_NODIVIDE | Grouped Objects can’t be ungrouped |
| BL_NOBLOCKEDIT | Single Object of a group can’t be double-clicked |
| BL_NOAXISEDIT | Axes elements can’t be double-clicked |
| BL_NOPRINT | Object won’t be printed on the printer |
| BL_NOHANDLE | Object handle won’t be drawn |
| BL_NODATA | Layer (Diagram) can’t have datasets |
| BL_NODRAG | Combination of (BL_NOSIZE | BL_NOPOS) |
| BL_FIXED | Combination of (BL_NOEDIT | BL_NOSIZE | BL_NOPOS) |
| BL_NOSELECT | The same as BL_FIXED |
| BL_HIDE | Hides an element. If the flag is set the element is invisible. |
Example
hrect = RBCreate();
OBJSetPosSize(hrect, [5, -10, 5, 5]);
OBJSetProtect(hrect, BL_FIXED | BL_NOHANDLE);
See also
id-639009