cmdShell [-annotation string] [-backgroundColor float float float] [-clear] [-defineTemplate string] [-docTag string] [-dragCallback script] [-dropCallback script] [-enable boolean] [-exists] [-height int] [-isObscured] [-manage boolean] [-numberOfHistoryLines int] [-numberOfPopupMenus] [-numberOfSavedLines int] [-parent string] [-popupMenuArray] [-preventOverride boolean] [-prompt string] [-useTemplate string] [-visible boolean] [-width int]
[string]
cmdShell は「元に戻す」が可能、「照会」が可能、「編集」が可能です。
このコマンドは、入力に対して UNIX シェルと同じ動作をするスクロール フィールドを作成します。-nsl/numberOfSavedLines フラグつきのフィールドで保存される行数を指定することができます。保存されるデフォルトの行数は 100 です。shellField は、コマンド ヒストリ バッファも保持します。 -hlc/historyLineCount フラグで保存される入力行数を指定することができます。このバッファのデフォルト サイズは 10 です。| string | コントロールへのフル パス名。 |
戻り値の型は照会モードでは照会フラグが基になります。
| ロング ネーム(ショート ネーム) | 引数型 | プロパティ | ||
|---|---|---|---|---|
-exists(-ex)
|
|
|
||
|
||||
-defineTemplate(-dt)
|
string
|
|
||
|
||||
-useTemplate(-ut)
|
string
|
|
||
|
||||
-parent(-p)
|
string
|
|
||
|
||||
-enable(-en)
|
boolean
|
|
||
|
||||
-width(-w)
|
int
|
|
||
|
||||
-height(-h)
|
int
|
|
||
|
||||
-visible(-vis)
|
boolean
|
|
||
|
||||
-isObscured(-io)
|
|
|
||
|
||||
-manage(-m)
|
boolean
|
|
||
|
||||
-numberOfPopupMenus(-npm)
|
|
|
||
|
||||
-popupMenuArray(-pma)
|
|
|
||
|
||||
-preventOverride(-po)
|
boolean
|
|
||
|
||||
-annotation(-ann)
|
string
|
|
||
|
||||
-backgroundColor(-bgc)
|
float float float
|
|
||
|
||||
-docTag(-dtg)
|
string
|
|
||
|
||||
-dragCallback(-dgc)
|
script
|
|
||
|
||||
-dropCallback(-dpc)
|
script
|
|
||
|
||||
-prompt(-pr)
|
string
|
|
||
|
||||
-clear(-cl)
|
|
|
||
|
||||
-numberOfSavedLines(-nsl)
|
int
|
|
||
|
||||
-numberOfHistoryLines(-nhl)
|
int
|
|
||
|
||||
// Delete the window if it already exists.
//
if (`window -exists ExampleWindow`) deleteUI -window ExampleWindow;
// Create a window containing a cmdShell and a couple buttons.
//
// Use a form layout to position the controls.
//
window -widthHeight 300 300 ExampleWindow;
string $form = `formLayout`;
string $cmdShell = `cmdShell`;
string $clearButton = `button -label "Clear"
-command ("cmdShell -edit -clear $cmdShell")`;
string $closeButton = `button -label "Close"
-command ("deleteUI -window ExampleWindow")`;
// Set up the attachments.
//
formLayout -edit
-attachForm $cmdShell "top" 0
-attachForm $cmdShell "left" 0
-attachControl $cmdShell "bottom" 0 $clearButton
-attachForm $cmdShell "right" 0
-attachNone $clearButton "top"
-attachForm $clearButton "left" 0
-attachForm $clearButton "bottom" 0
-attachPosition $clearButton "right" 0 50
-attachNone $closeButton "top"
-attachPosition $closeButton "left" 0 50
-attachForm $closeButton "bottom" 0
-attachForm $closeButton "right" 0
$form;
showWindow ExampleWindow;