User Tools

Site Tools


setcontrolsstatus_set_status_of_managed_controls_.htm
Navigation:  ABC Library Reference > RuleManager > RulesCollection Class Methods >====== SetControlsStatus (set status of managed controls) ====== Previous pageReturn to chapter overviewNext page

SetControlsStatus( [control [, action ]] )

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

setcontrolsstatus_set_status_of_managed_controls_.htm.txt · Last modified: 2021/04/15 15:57 by 127.0.0.1