The setFocus action acts differently depending on which part is receiving the action. For example, if you connect the setFocus action to a Window part, the window comes to the foreground and is the active window. Or, if you connect the setFocus action to a Text part in a window, the cursor is moved to this field.