Form and Item

Form and Item respond to basic touch events as follows:

  • On S60 5th Edition devices, touch down and release on a focusable but unfocused Item changes focus. From Symbian^3 onwards and on Series 40 devices, no separate focusing is required.

  • Touch down and release on an editable field, such as a TextField or DateField, activates the field for editing:

    • On Series 40 devices, by default, touch down and release activates in-line editing. The user can edit the value directly by using the physical keypad.

    • On Symbian devices, touch down and release opens the virtual keyboard.

    Touch down and release within the selected TextField moves the cursor.

    On Series 40 devices, touch down and release within the selected DateField moves the focus to the next subfield, which is not necessarily the one the user tapped. Repeated taps anywhere within the DateField loop the focus through the available subfields. The user cannot directly select a specific subfield by tapping it. On Symbian devices, touch down and release within the selected DateField moves the focus directly to the corresponding subfield.

  • If an Item has multiple commands assigned to it, touch down and hold on the Item opens a pop-up menu containing the commands. The pop-up menu corresponds to the context-specific Options menu of non-touch devices.

    If the default command has been set to an EXCLUSIVE ChoiceGroup, touch down and release on the selected EXCLUSIVE ChoiceGroup element activates the default command.

    If the default command has been set to a StringItem or ImageItem (in button or hyperlink mode), touch down and release on the focused item activates the default command.

  • Drag events are received by the Form. The only exceptions are horizontal drag events on a Gauge or TextField, which are received by the corresponding element.

    Gauge values can be changed by dragging the thumb across the slider. On Series 40 devices, the Gauge value can also be changed by tapping the slider or by entering a new value using the physical keypad.

    On Symbian devices, horizontal dragging on a TextField activates text selection, after which vertical dragging also controls the text selection area. This feature is not supported on Series 40 devices.

  • Dragging or flicking Form content cancels all activation arming, such as command activation.

Touch release is typically used for launching commands, toggling settings, or using mark and unmark functionality.

Form supports a scrollbar:

  • On Series 40 devices, a scrollbar is shown only when the content needs scrolling. The scrollbar is purely informational and therefore non-interactive. Dragging or flicking the content scrolls it.

  • On S60 5th Edition devices, a scrollbar is always shown, even when the content does not need scrolling. From Symbian^3 onwards, the scrollbar is shown only when the content needs scrolling. The scrollbar is touch-enabled. Dragging the scrollbar scrolls the content. The content can also be scrolled by directly dragging or flicking the content.

While selected, editable Items display a visual cue indicating that the element is active and its contents can be edited:

  • Series 40 devices display a border around the value area of the selected Item. The Item does not have a focus highlight.

  • Symbian devices display a permanent focus highlight for the selected Item.

CustomItem works much like Canvas. You can use the CustomItem.getInteractionModes method to check whether touch is supported. Touch events are sent to the MIDlet, so you can implement internal focus traversal to interact with the events.

For more information about using Form and Item, see section Form.