Date: 2009-11-19 17:42:15 -0800 (Thu, 19 Nov 2009)
http://bugs.adobe.com/jira/browse/SDK-22414 - DropDownList doesn't respect typicalItem
The default size of DropDownList and ComboBox will remain the same. If typicalItem is set, then the component will size itself to fit that item.
When typicalItem is set:
In DropDownList.measure, we set the labelDisplay to the typicalItem, force validation of the skin, set the labelDisplay's size to its measured size and then restore the labelDisplay to the selectedItem. The component sets labelIDisplay's width and height because we want typicalItem to take priority over the an explicit width and height set in the skin. The default skin sets an explicit width on the labelDisplay in order to prevent the DropDownList from changing size when the selectedItem changes. If typicalItem is set back to null, then the component restores the original width/height of the labelDisplay.
In ComboBox.commitProperties, we set the textInput.widthInChars to the length of the typicalItem.
QE notes: Need tests for typicalItem
Doc notes: Update the ASDoc for DropDownList.typicalItem and ComboBox.typicalItem. Mention typicalItem in class comments
Reviewer: Alex, Glenn
Tests run: checkintests, DropDownList, ComboBox
Is noteworthy for integration: Should Builder promote this property to be of higher importance?