View.Visible

Description

Sets or returns a Boolean value indicating whether this view is visible (true) or not.

Note: A minimized or collapsed view is still considered Visible.

C# Syntax

// get accessor
Boolean rtn = View.Visible;
// set accessor
View.Visible = Boolean;

Examples

JScript Example

/*
	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;
}

See Also

View.State