How to: |
The SetLayer command allows layers to be set as visible or invisible at run time. It can be used in a Maintain or a JavaScript event.
The syntax of the SetLayer command is
Maintain
Formname.SetLayer.(“layername“,n);
JavaScript
setLayer.formname.(“layername“,n);
Note: JavaScript is case-sensitive.
where:
Is the name of the layer, enclosed in double quotation marks.
Possible values are:
To preset a layer before the form is run, you can use the SetLayer command with the Winform Show_inactive command:
Winform Show_inactive Form1;
Form1.SetLayer(“Layer1“,1);
Form1.SetLayer(“Layer2“,0);
Winform Show Form1;
This sets Layer1 as visible and Layer2 as invisible.
WebFOCUS |