When accessing controls that have been added to an OpenLayers panel, you will need to determine the index of the control in question and access the control via the panel.controls object.
My intent was to change the layer that a drawFeature controls was adding features too. The simple snippet below shows the call to change the layer being edited by a point feature.
//Simple function to find an index by array object attribute.
function findWithAttr(array, attr, value) {
for(var i = 0; i < array.length; i++ ) {
if(array[i][attr] === value) {
return i;
}
}
}
//Get you controls array for the index function.
var controlArray = panel.controls;
//This call accesses the controls on your panel(may not be named panel) by the index
// of the displayClass of the control, and returns the layer that is linked to that control.
panel.controls[findWithAttr(controlArray, "displayClass", "olControlDrawFeaturePoint")].layer
After accessing the correct control you can simply reassign the layer of the control to a different layer using the below as an example.
panel.controls[0].layer = zlayer;
In that example the 0 is the index of the control which you would need to determine with the above sample.