2011-11-16 43 views
0

我跟着一個例子來顯示一個列表和代碼如下...檢測TileListItemRenderer Flex中

<mx:TileList id="tileList" 
       dataProvider="{xmlListColl}" 
       itemRenderer="TileListItemRenderer" 
       columnCount="3" 
       columnWidth="150" 
       rowCount="2" 
       rowHeight="100" /> 

的itemRenderer是:

<mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml" 
      x="496" y="10" width="221" height="317" backgroundColor="#98AEEF"> 

    <mx:Image source="{[email protected]}" 
      horizontalCenter="0" 
      verticalCenter="0" /> 

    <mx:Label text="{[email protected]}" 
      fontWeight="bold" 
      horizontalCenter="0" 
      bottom="0" /> 

</mx:Canvas> 

現在我想幫助有這些圖像與拖動啓用。所有dragDrop函數都在主要的mxml文件中......我有點迷失在這裏。任何其他信息,請不要問我。

謝謝

+0

是否需要拖拽排序列表的功能? – eterps

回答

2

您需要在您的TileList上設置dragEnabled爲true。如果您只是在TileList中重新排列,則將其dragMoveEnabled和dropEnabled設置爲true。如果要將其拖到另一個列表中,請在該列表上設置dropEnabled true,但如果要從一個列表複製到另一個列表,請參閱http://livedocs.adobe.com/flex/3/html/help.html?content=dragdrop_7.html中的「維護複製期間的類型信息」。

如果您的目的地是集裝箱,請檢查http://livedocs.adobe.com/flex/3/html/help.html?content=dragdrop_7.html

FWIW,如果您提供了關於您正在嘗試做什麼的更多信息,我只需要向您提供這些信息之一。你是尋求幫助的人,所以你應該提出至少與你要求別人一樣的努力。

+0

我很抱歉。我沒有解釋清楚。我想把它拖放到另一個畫布上。真的很感激你的幫助..將盡全力讓你知道。 –

+0

它使用dragEnabled來「真」 –

相關問題