def
def

Reputation: 75

Flex disable draginitiator?

I'm trying to disable the draginitiator, that's the semi-transparant object when you drag something. Does anyone know how to do this?

EDIT Code

<s:List id="dg_ads" top="75" bottom="0" width="100%" borderVisible="false" 
    dragEnabled="true" dropEnabled="true" dragMoveEnabled="true"
    dragComplete="dg_ads_dragCompleteHandler(event)"
    doubleClickEnabled="true" doubleClick="dg_ads_doubleClickHandler(event)"
    contentBackgroundColor="#FFFFFF">
        <s:layout>
            <s:TileLayout useVirtualLayout="false" clipAndEnableScrolling="false"
                          horizontalGap="5" verticalGap="5" />
        </s:layout>
</s:List>

Upvotes: 1

Views: 557

Answers (2)

user700284
user700284

Reputation: 13620

Create a custom list class that extends spark List and override createDragIndicator() method.This is method is used by the DragManager to create the dragProxy(The image you will see when a drag operation is in progress).

override public function createDragIndicator():IFlexDisplayObject
        { 
            var dragIndicator:UIComponent;
            dragIndicator = new UIComponent();
            dragIndicator.width = 0;
            dragIndicator.height = 0;
            return dragIndicator;
        }

Use the custom list instead of spark List in your application

Upvotes: 1

Jason Towne
Jason Towne

Reputation: 8050

From this question:

Try:

event.dragInitiator.visible = false;

or create your own version of the DragProxy class and remove the portions you don't want.

Upvotes: 0

Related Questions