I wrote a simple renderer to display a concatination of two fields on
the object item in a list.  MXML code is below:

<?xml version="1.0" encoding="utf-8"?>

<mx:Text xmlns:mx="http://www.adobe.com/2006/mxml";

     text="{StringUtil.trim(data.NAME)} - {StringUtil.trim(data.LABEL)}"

     textAlign="left" selectable="false" height="100%">

     <mx:Script>

         <![CDATA[

             import mx.utils.StringUtil;

         ]]>

     </mx:Script>

</mx:Text>

Because of the length of the Text, I enabled word wrap on the List box.

I have two list boxes.  A user selects items out of the populated box by
draging the item to the other box.  The problem is when a single item is
drug to the second box, only the top portion of the text (and not even
the full first line -- about the top 3/4 of the first line) is
displayed.  When I use a button to move all the objects to the second
box, the items are displayed correctly.

I am handling the drag and drop by the default methods in the List
control (dragEnabled, dragMoveEnable, and dropEnabled are all set to
"true").

I added a button to add a selected item to the second box, this seems to
work OK.  If I move 1 item over this way, and then drag a second item,
both items are displayed correctly.

This would seem to be a problem with the default drag and drop
initializing the height of the item field in the List box.  Has anyone
seen this before?  Does anyone have ideas on how to work around this?

Thanks

Dominic

Reply via email to