ShowDependents(View: IWxView; [Recursive: Boolean = false]);
ShowDependents(View: Prognoz.Platform.Interop.Andy.IWxView; Recursive: System.Boolean);
View. The parameter determines the workspace, which displays selection points of objects' shapes, which depend on this object.
Recursive. The parameter determines whether the whole tree of objects is displayed, which depend on this object. The parameter is set to False by default, the workspace displays only objects of the first level of hierarchy.
The ShowDependents method displays the objects, which depend on this object on the workspace.
The objects, which depend on this object, are displayed on the workspace where the object itself is also displayed. Selection points of objects' shapes are displayed on the workspace passed by the View parameter.
Executing the example requires an object of the Workspace type. Create a form, add the Button1 button to it, the WorkspaceBox component named WorkspaceBox1, the UiWorkspaceObject component named UiWorkspaceObject1, specify the workspace as an object of the UiWorkspaceObject1 component, the UiWorkspaceObject1 component as a data source of the WorkspaceBox1 component and the True value of the Active property of the UiWorkspaceObject1 component. Add the CheckBox component named CheckBox1. Add links to the Collections, Metabase and Workspace system assemblies.
Class OBJ48413Form: Form
UiWorkspaceObject1: UiWorkspaceObject;
WorkspaceBox1: WorkspaceBox;
Button1: Button;
CheckBox1: CheckBox;
Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Begin
(WorkspaceBox1.View.Workspace.Shapes.Item(3).Extension As IWxMetabaseObject).ShowDependents(WorkspaceBox1.View, CheckBox1.Checked);
End Sub Button1OnClick;
End Class OBJ48413Form;
When the CheckBox1 checkbox is selected, on clicking the Button1 button the WorkspaceBox1 component area displays the whole tree of objects, which depend on the object with the 3 index,; when the CheckBox1 checkbox is deselected, objects of the first level of hierarchy are displayed.
Executing the example requires an object of the Workspace type. Create a form, add the Button1 button to it, the WorkspaceBoxNet component named WorkspaceBoxNet1, the UiWorkspaceObjectNet component named UiWorkspaceObjectNet1, specify the workspace as an object of the UiWorkspaceObjectNet1 component, the UiWorkspaceObjectNet1 component as a data source of the WorkspaceBoxNet1 component and the True value of the Active property of the UiWorkspaceObjectNet1 component. Add the CheckBoxNet component named CheckBoxNet1. Add links to the Collections, Metabase and Workspace system assemblies.
Imports System;
Imports System.Collections.Generic;
Imports System.ComponentModel;
Imports System.Data;
Imports System.Drawing;
Imports System.Text;
Imports System.Windows.Forms;
Imports Prognoz.Platform.Forms.Net;
Imports Prognoz.Platform.Interop.Andy;
Imports Prognoz.Platform.Interop.Metabase;
Imports Prognoz.Platform.Interop.Workspace;
Public Partial Class OBJ995Form: Prognoz.Platform.Forms.Net.ForeNetForm
Public Constructor OBJ995Form();
Begin
InitializeComponent();
End Constructor;
Private Sub button1_Click(sender: System.Object; e: System.EventArgs);
Begin
(WorkspaceBoxNet1.View.Workspace.Shapes.Item[3].Extension As IWxMetabaseObject).ShowDependents(WorkspaceBoxNet1.View, CheckBox1.Checked);
End Sub;
End Class;
When the CheckBoxNet1 checkbox is selected, on clicking the Button1 button the WorkspaceBoxNet1 component area displays the whole tree of objects, which depend on the object with the 3 index; when the CheckBoxNet1 checkbox is deselected, objects of the first level of hierarchy are displayed.
See also: