Enabling or disabling a control
You can enable or disable a UI control object based on a predefined condition by editing attributes of its corresponding control element in the controls.xml file.
About this task
When a control is enabled, it is clickable and its appearance is controlled by an attribute in the controls.xml file. You can use this functionality to customize the availability of a control based on conditions you specify. For example, you may want to enable the Next Image icon control when the image being viewed is not the last in a series, but disable it when the last image is being displayed. To do so, add the applicable conditions to <enabled> and <disabled> tags within the Next Image control's definition in the controls.xml file.