0 Replies Latest reply on Nov 19, 2009 5:42 PM by Jason Szeto

    [svn:fx-trunk] 12024: http://bugs.adobe.com/jira/browse/ SDK-22414 - DropDownList doesn't respect typicalItem

    Jason Szeto Level 3

      Revision: 12024

      Revision: 12024

      Author:   jszeto@adobe.com

      Date:     2009-11-19 17:42:15 -0800 (Thu, 19 Nov 2009)

      Log Message:

      ***********

      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

      Bugs: SDK-22414

      Reviewer: Alex, Glenn

      Tests run: checkintests, DropDownList, ComboBox

      Is noteworthy for integration: Should Builder promote this property to be of higher importance?

       

      Ticket Links:

      ***********

          http://bugs.adobe.com/jira/browse/SDK-22414

          http://bugs.adobe.com/jira/browse/SDK-22414

       

      Modified Paths:

      **************

          flex/sdk/trunk/frameworks/projects/spark/src/spark/components/ComboBox.as

          flex/sdk/trunk/frameworks/projects/spark/src/spark/components/DropDownList.as

          flex/sdk/trunk/frameworks/projects/spark/src/spark/components/DropDownListBase.as