MAXScript Tools and Interaction with 3ds Max > Creating MAXScript Tools > Scripted Utilities and Rollouts > Rollout User-Interface Controls >

# Setting Focus on User Interface Controls

| Creating User Interfaces - Quick Navigation

You can set the focus on a specific User Interface Control Item using

    setFocus <rollout_ui_item>

EXAMPLE:
    rollout testFocus "Test Focus"
    (
      edittext text1 "Test"
      edittext text2 "Focus"
    )
    createDialog testFocus 200 100
    setFocus testFocus.text2 -- the second text field gets focus!

In 3ds Max 6 and higher,

SetFocus() can be used to set focus on ActiveX controls, too.

#### See Also

- Rollout User-Interface Controls Types

- ActiveX Controls in MAXScript Rollouts