OBJSetProtect

OBJSetProtect sets or clears different attributes for diagrams and drawing objects.

bool = OBJSetProtect(hobj, nProtect)

Return Value

If the function succeeds, the return value bool is TRUE (1); otherwise it is FALSE (0).

Parameters

hobj

hobj identifies a line, text, rectangle, ellipse or layer (diagram) object.

nProtect

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.
BL_CLICKBUTTON Text Object only: Callback function will be invoked.
BL_DISPLAYBUTTON Text Object only: Text will be displayed as a button.

Example

hrect = RBCreate();
OBJSetPosSize(hrect, [5, -10, 5, 5]);
OBJSetProtect(hrect, BL_FIXED | BL_NOHANDLE);

History

Version Description
R2012.2 (5.40.2) New attributes BL_CLICKBUTTON and BL_DISPLAYBUTTON.

id-639009