2010-02-22 73 views

回答

2

可以調用open方法(它調用的mx_internal方法displayDropdown):

<?xml version="1.0" encoding="utf-8"?> 
<mx:Application 
xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"> 

<mx:Script> 
    import mx.events.DropdownEvent; 

    protected function initializeInterruption():void 
    { 
    color.addEventListener(DropdownEvent.CLOSE, interrupt); 
    } 

    protected function interrupt(event:Event):void 
    { 
    color.open(); 
    } 
    </mx:Script> 

<mx:ColorPicker id="color" closeDuration="0" openDuration="0" 
    initialize="initializeInterruption()" 
    creationComplete="color.open()"/> 

</mx:Application> 

您還可以延長ColorPicker類和壓倒一切的一些/所有這些方法的選擇:

  • keyDownHandler
  • downArrowButton_buttonDownHandler
  • open
  • close

讓我知道如果這樣的作品, 蘭斯

+0

這個工作只是我想要的方式,謝謝! – Yeti 2010-02-23 08:59:26