.. highlightlang:: us .. index:: OBJSetProtect .. _objsetprotect: OBJSetProtect ============= .. us.tag OBJSetProtect ENGLISH draw-set Changed5402 :ref:`OBJSetProtect` sets or clears different attributes for diagrams and drawing objects. .. function:: bool = OBJSetProtect(hobj, nProtect) .. us.return **Return Value** If the function succeeds, the return value *bool* is TRUE (1); otherwise it is FALSE (0). .. us.params **Parameters** .. uparam:: hobj *hobj* identifies a line, text, rectangle, ellipse or layer (diagram) object. .. uparam:: nProtect *nProtect* is a combination of the following attributes: .. list-table:: :header-rows: 1 * - 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. .. us.example **Example** :: hrect = RBCreate(); OBJSetPosSize(hrect, [5, -10, 5, 5]); OBJSetProtect(hrect, BL_FIXED | BL_NOHANDLE); .. us.history **History** .. list-table:: :header-rows: 1 * - Version - Description * - R2012.2 (5.40.2) - New attributes ``BL_CLICKBUTTON`` and ``BL_DISPLAYBUTTON``. .. seealso:: :ref:`overview-drawing-objects`, :ref:`OBJGetProtect`, :ref:`OBJGetVisible`, :ref:`OBJSetVisible` :sub:`id-639009`