Clear Up
SharpKit Reference

Picker Class

An abstract class for fields that have a single trigger which opens a "picker" popup below the field, e.g. a combobox menu list or a date picker. It provides a base implementation for toggling the picker's visibility when the trigger is clicked, as well as keyboard navigation and some basic events. Sizing and alignment of the picker can be controlled via the matchFieldWidth and pickerAlign/pickerOffset config properties respectively.

You would not normally use this class directly, but instead use it as the parent class for a specific picker field implementation. Subclasses must implement the createPicker method to create a picker component appropriate for the field.

Namespace: Ext.form.field



Name Description
alignPicker() Aligns the picker to the input element
collapse() Collapses this field's picker dropdown.
createPicker() Creates and returns the component to be used as this field's picker. Must be implemented by subclasses of Picker. The current field should also be passed as a configuration option to the picker component as the pickerField property.
expand() Expands this field's picker dropdown.
getPicker() Returns a reference to the picker component for this field, creating it if necessary by calling createPicker.
onTriggerClick() Handles the trigger click; by default toggles between expanding and collapsing the picker component. Overrides: Ext.form.field.Trigger.onTriggerClick


Name Description
isExpanded True if the picker is currently expanded, false if not.


Name Description
matchFieldWidth Whether the picker dropdown's width should be explicitly set to match the width of the field. Defaults to true. Defaults to: true
openCls A class to be added to the field's bodyEl element when the picker is opened. Defaults to: "x-pickerfield-open"
pickerAlign The alignment position with which to align the picker. Defaults to "tl-bl?" Defaults to: "tl-bl?"
pickerOffset An offset [x,y] to use in addition to the pickerAlign when positioning the picker. Defaults to undefined.
© Copyright 2005-2011 SharpKit. All rights reserved.