Your Ad Here

Go to: Synopsis. Return value. Python examples.

Synopsis

setFocus( controlName | panelName )

Note: Strings representing object names and arguments must be separated by commas. This is not depicted in the synopsis.

setFocus is undoable, queryable, and editable.

Give keyboard focus to a specific control or panel.

Return value


Nothing.

Python examples

import maya.cmds as cmds

cmds.window()
cmds.columnLayout()
cmds.textField('tf0', changeCommand='cmds.setFocus("tf1")' )
cmds.textField('tf1', changeCommand='cmds.setFocus("tf2")' )
cmds.textField('tf2', changeCommand='cmds.setFocus("tf0")' )
cmds.showWindow()

  

Return to Autodesk Index


Your Ad Here