Home | Trees | Indices | Help |
|
---|
|
object --+ | util.IEventListener --+ | terminal.paintable.IPaintable --+ | object --+ | | | terminal.variable_owner.IVariableOwner --+ | object --+ | | | terminal.sizeable.ISizeable --+ | IComponent --+ | IFocusable
A sub-interface implemented by components that can obtain input focus.
This includes all Field
components as well as
some other components, such as Upload.
Focus can be set with focus. This interface does not provide an accessor that
would allow finding out the currently focused component; focus
information can be acquired for some (but not all) Field
components through the IFocusListener and IBlurListener interfaces.
See Also:
FieldEvents
|
|||
Inherited from |
|
|||
Inherited from |
|
Sets the focus to this component: loginBox = Form() loginBox.setCaption("Login") layout.addComponent(loginBox) # Create the first field which will be focused username = TextField("User name") loginBox.addField("username", username) # Set focus to the user name username.focus() password = TextField("Password") loginBox.addField("password", password) login = Button("Login") loginBox.getFooter().addComponent(login) Notice that this interface does not provide an accessor that would allow finding out the currently focused component. Focus information can be acquired for some (but not all) IField components through the IFocusListener and IBlurListener interfaces.
|
Gets the tabulator index of the
See Also: setTabIndex |
Sets the tabulator index of the loginBox = Form() loginBox.setCaption("Login") layout.addComponent(loginBox) # Create the first field which will be focused username = TextField("User name") loginBox.addField("username", username) # Set focus to the user name username.focus() password = TextField("Password") loginBox.addField("password", password) login = Button("Login") loginBox.getFooter().addComponent(login) # An additional component which natural focus order would # be after the button. remember = CheckBox("Remember me") loginBox.getFooter().addComponent(remember) username.setTabIndex(1) password.setTabIndex(2) remember.setTabIndex(3) # Different than natural place login.setTabIndex(4) After all focusable user interface components are done, the browser can begin again from the component with the smallest tab index, or it can take the focus out of the page, for example, to the location bar. If the tab index is not set (is set to zero), the default tab order is used. The order is somewhat browser-dependent, but generally follows the HTML structure of the page. A negative value means that the component is completely removed from the tabulation order and can not be reached by pressing the Tab key at all.
See Also: getTabIndex |
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Sat Jul 6 19:32:55 2013 | http://epydoc.sourceforge.net |