"defaultRenameAction" - obsolete with version 3.12

The attribute "defaultRenameAction" specifies what action to perform when the editor loses focus during renaming.

Synopsis

shape.defaultRenameAction(string action);

Parameters

Parameter Description
shape Name of the object
action

"Accept " = an item is renamed although enter is not pressed

"Reject" = an item is not renamed unless you press enter.

Description

The attribute "defaultRenameAction" specifies what action to perform when the editor loses focus during renaming.

If the attribute is set to "Accept", and you rename an item and the editor loses focus (without you pressing Enter), the item will still be renamed. If the attribute is set to "Reject";, the item will not be renamed unless you press Enter.

Example

In the following example the "defaultRenameAction" is set to "Reject". This means that an item is not renamed unless you press Enter.

main()
{
  TREE1.defaultRenameAction("Reject");
}

Assignment

Tree widget, DpTreeView