2 Replies Latest reply on Apr 2, 2008 7:05 AM by Brent Lamborn

    Custom Component in Combobox

    Brent Lamborn
      Hi everyone.

      I'm brand new to flex as of yesterday. I've created a custom component in the Flex Builder 3 IDE as follows:

      <?xml version="1.0" encoding="utf-8"?>
      <mx:Panel xmlns:mx=" http://www.adobe.com/2006/mxml" layout="absolute" width="347" height="110" backgroundColor="#27C8D2" fontFamily="Arial" fontWeight="normal">
      <mx:Image x="10" y="10" source="../Images/placeholder.png" id="Image"/>
      <mx:LinkButton x="68" y="27" label="Item Title" textAlign="left" id="Description"/>
      <mx:Label x="262" y="29" height="30" width="55" textAlign="center" enabled="true" id="Price" text="$1.00" fontWeight="bold" fontFamily="Arial"/>

      I named the custom component DropDownItem. So now I want to have multiple DropDownItem's appear in a Combobox:

      <mx:ComboBox x="151" y="37" width="340" height="110" labelField="Cover Style">
      <ns1:DropDownItem></ns1:DropDownItem >
      <ns1:DropDownItem></ns1:DropDownItem >

      I am amble to run the flex app, but the items in the Combobox appear as plain 'ol items. They don't show the image, link button or label, and don't retain the height I have set on the DropDownItem or anything.

      Can anyone point me in the right direction?