| **Navigation:**  [[abc library reference.htm|ABC Library Reference]] > RuleManager > RulesCollection Class Methods >====== SetControlsStatus (set status of managed controls) ====== | [[rulecount count rules in the collection .htm|{{btn_prev_n.gif|Previous page}}]][[abc library reference.htm|{{btn_home_n.gif|Return to chapter overview}}]][[setenumerateicons set icons for broken rules display .htm|{{btn_next_n.gif|Next page}}]] | | || **SetControlsStatus( **[//c////ontrol// [, //action// ]] **)** {{blk2blue.jpg|blk2blue.jpg}} | **SetControlsStatus** | Sets the hidden or disabled status of a control or controls managed by this RulesCollection object. | | //Action// | A numeric constant, variable, EQUATE, or expression that indicates the action to be taken with respect to this control when a rule is broken, defined as follows: | | RuleAction:None | EQUATE(0) | | RuleAction:Hide | EQUATE(1) | | RuleAction:UnHide | EQUATE(2) | | RuleAction:Disable | EQUATE(3) | | RuleAction:Enable | EQUATE(4) | | //Control// | A numeric constant, variable, EQUATE, or expression that contains a field equate value. | The **SetControlsStatus **method sets the status of controls managed by this RulesCollection object depending on the parameters supplied. If //control// is supplied, only status changes involving that control are processed. If //action// is supplied, only status changes involving that action are processed. If neither is supplied, then all changes for all controls are processed. **Example:** **RulesCollection.SetControlsStatus PROCEDURE** **lIndex  LONG** **lIndex2 LONG** **lChange BYTE** **   CODE** **   LOOP lIndex=1 TO RECORDS(SELF.Controls)** **     GET(SELF.Controls,lIndex)** **     IF ERRORCODE() THEN BREAK.** **     SELF.SetControlsStatus(SELF.Controls.Control,pAction)** **   END**