Jaa


TreeNode.newObjectName Method

Definition

Overloads

newObjectName()

Returns a string that contains the name of the new element.

newObjectName(String)

newObjectName()

Returns a string that contains the name of the new element.

public:
 virtual System::String ^ newObjectName();
public virtual string newObjectName ();
abstract member newObjectName : unit -> string
override this.newObjectName : unit -> string
Public Overridable Function newObjectName () As String

Returns

The string that contains the name of the new element.

Remarks

If no argument is passed, the new node name is determined by the child node type. For example, if the TreeNode has forms as children, calling this method without an argument will return "Form1". If the tree node has several child node types, the method returns the string "object".

The following call to Treenode.newObjectName returns "object" because the data dictionary node has children that represent several object types.

{ 
    TreeNode t; 
    str s; 
    t = TreeNode::findNode("\Data dictionary"); 
    s = t.newObjectName(); 
    print s; 
    pause; 
}

Applies to

newObjectName(String)

public:
 virtual System::String ^ newObjectName(System::String ^ _oldName);
public virtual string newObjectName (string _oldName);
abstract member newObjectName : string -> string
override this.newObjectName : string -> string
Public Overridable Function newObjectName (_oldName As String) As String

Parameters

_oldName
String

The new name of the node; optional. If no argument is passed, the new node name is determined by the child node type.

Returns

Applies to