移動先: 概要 注記. 戻り値 MEL 例.

概要

renameUI string string

renameUI は 「元に戻す」が可能、「照会」が不可能「編集」が不可能 です。

このコマンドは、1 番目の引数として渡された UI オブジェクトの名前を、2 番目の引数として指定された新しい名前に変更します。新しい名前が重複しているか有効でない場合、名前の変更は失敗して古い名前が返されます。

注記

このコマンドは、オブジェクトを名前で参照している他のオブジェクトやコマンドは更新しないので、使用するにあたっては十分に注意してください。

戻り値

string新しい名前。名前の変更に失敗した場合は古い名前。

MEL 例

//    Create a window with a single button.
//
string $window = `window`;
columnLayout;
button -label "Example" exampleButton;
showWindow $window;

//    Edit the button label.
//
button -edit -label "New Label" exampleButton;

//    Rename the button.
//
renameUI exampleButton newButton;

//    Query the button label using the new object name.
//
button -query -label newButton;