📄 filerenderer.mxml
字号:
<mx:HBox backgroundAlpha="0" horizontalGap="0" verticalAlign="middle" width="100%" xmlns:mx="http://www.macromedia.com/2003/mxml">
<mx:Script>
// Provide file icon for all items that are files
// Might potentially expands to recognize specific file types
[Embed( "images/file.gif" )]
private var imgFile:String = null;
// Provide folder icon for all items that are folders (directories)
[Embed( "images/folder.gif" )]
private var imgFolder:String = null;
// Implement setValue method to handle row specific display
public function setValue( str:String, item:Object, sel:Boolean ):Void {
// Manage the icon in the renderer to represent item type
if( !item.file ) {
imgIcon.source = imgFolder;
} else {
imgIcon.source = imgFile;
}
// Set the name of the item
lblName.text = item.name;
}
</mx:Script>
<!-- Spacer used for more fine-grained control versus margins -->
<mx:Spacer width="3" />
<!-- Display icon and name for item being rendered -->
<mx:Image id="imgIcon" />
<mx:Label id="lblName" width="100%" />
</mx:HBox>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -