| **Navigation:**  [[abc library reference.htm|ABC Library Reference]] > WindowManager > WindowManager Methods >====== TakeDisableButton (disable target button control) {{c6h0009.jpg|C6H0009.jpg}} ====== | [[takecompleted a virtual to complete an update form .htm|{{btn_prev_n.gif|Previous page}}]][[abc library reference.htm|{{btn_home_n.gif|Return to chapter overview}}]][[takeevent a virtual to process all events windowmanagerclass .htm|{{btn_next_n.gif|Next page}}]] | | || **TakeDisableButton (**//control//, //flag//**), VIRTUAL** {{blk2blue.jpg|blk2blue.jpg}} | control | An integer constant, variable, EQUATE, or expression containing the control number of the control whose contents to disable. This is the field equate number of the control. | | flag | A BYTE value that controls whether the target control will be enabled or disabled. | The **TakeDisableButton **virtual** **method processes a target control and disables the control if the //flag// value is set to TRUE (1). If the //flag// value is set to FALSE (0), the target control is enabled. **Implementation:** The **EnableCancelControls** and the **DisableCancelControls** PRIVATE methods call the **TakeDisableButton** method. **Example:** **WindowManager.****TakeDisableButton**** PROCEDURE(SIGNED Control,BYTE MakeDisable)** **  CODE** **     IF Control THEN** **        IF MakeDisable THEN** **           DISABLE(Control)** **        ELSE** **           ENABLE(Control)** **        END** **     END** **See Also:     **[[saveoninsertaction execute insert record activity and remain active .htm|SaveonInsertAction]] , [[takeaccepted a virtual to process event accepted windowmanager .htm|TakeAccepted]]