写AIR的过程中,可能会用到文件系统的相关控件。比如选择某一目录,浏览文件列表等。

 

AIR中有三种比较常用的列表类组件 --- List、Tree、DataGrid,它们的效果分别如下图所示:

AIR中的文件系统控件

分别对应:FileSystemList、FileSystemTree、FileSystemDataGrid

?>
>
   5:     
   6:     <mx:Script>
   7:         <![CDATA[
import mx.events.FileEvent;
   9:             
void
  11:             {
  12:                 fileCB.directory = File.documentsDirectory;
  13:             }
  14:             
void
  16:             {
  17:                 trace(evt.file.nativePath);
  18:             }
  19:             
  20:         ]]>
  21:     </mx:Script>
  22:     
>
  24:         
 />
  26:         
 />
  28:         
  29:     </mx:HBox>
  30:     
>
  32:         
 />
  34:         
 />
  36:         
  37:     </mx:HBox>
  38:     
  39:     
  40:     
  41: </mx:WindowedApplication>

相关文章:

  • 2021-05-19
  • 2021-08-01
  • 2021-08-10
  • 2021-10-04
  • 2021-07-03
  • 2022-12-23
  • 2021-06-05
猜你喜欢
  • 2021-07-06
  • 2021-11-17
  • 2021-12-24
  • 2022-12-23
  • 2022-12-23
  • 2021-06-09
  • 2021-11-08
相关资源
相似解决方案