View.Visible

説明

このビューが表示されるか(true)表示されないか(false)を示すBoolean値を設定したり、戻したりします。

注:最小化された、または折りたたまれたビューは、Visible であると見なされます。

JScript の例

/*
        This example shows how you can set up a toggle button for 
        a view by creating a runtime property page with a button
        with logic attached that negates whatever the value the
        View.Visible property is currently set to.
*/
NewScene("", false);
var oPSet = ActiveSceneRoot.AddProperty("CustomProperty", false, "ViewToggleExample");
// Define layout
var oLayout = oPSet.PPGLayout;
oLayout.AddButton("Toggle");
// Connect the logic
oLayout.Logic = Toggle_OnClicked.toString();
oLayout.Language = "JScript";
// Show the property page and immediately delete it
InspectObj(oPSet, null, "Toggle View Demo", siModal, false);
DeleteObj(oPSet);
// ------------------------------------------------------
// Handler function
function Toggle_OnClicked()
{
        var oLayout = Desktop.ActiveLayout;
        oLayout.Views(0).Visible = !oLayout.Views(0).Visible;
}

関連項目

View.State