以下を使用して、特定のユーザ インタフェース コントロール項目( RolloutFloater または Rollout using)のフォーカスを設定できます。
setFocus (<RolloutControl>|<RolloutFloater>|<Rollout>|<Rollout>.hwnd)
以下を使用して、前面に移動し(「一番上」のダイアログにするなど)、ユーザ インタフェース コントロール項目の RolloutFloater または Rollout にフォーカスを設定できます。3ds Max 2021.1 Update以降で使用できます。
setForegroundWindow (<RolloutControl>|<RolloutFloater>|<Rollout>|<Rollout>.hwnd)
例:
rollout testFocus "Test Focus" ( edittext text1 "Test" edittext text2 "Focus" ) createDialog testFocus 200 100 testFloater = newRolloutFloater "My Floater" 300 220 setfocus testFocus setfocus testFocus.hwnd setfocus testFocus.text2 -- the second text field gets focus setfocus testFloater setForegroundWindow testFocus setForegroundWindow testFocus.hwnd setForegroundWindow testFloater
3ds Max 6 以降の場合
SetFocus()
を使用して ActiveX コントロールのフォーカスも設定できます。