在FLEX中,拷贝文本内容到剪贴板.
2008-04-05 20:07
211 查看
<?xml version="1.0" encoding="utf-8"?>
<!-- http://blog.flexexamples.com/2008/01/30/copying-text-to-the-operating-system-clipboard-in-flex/ -->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
layout="vertical"
verticalAlign="middle"
backgroundColor="white">
<mx:Script>
<![CDATA[
import mx.controls.Alert;
private function button_click():void {
System.setClipboard(richTextEditor.text);
Alert.show("Done");
}
]]>
</mx:Script>
<mx:ApplicationControlBar dock="true">
<mx:Button id="button"
label="Copy text to clipboard"
toolTip="Click here to copy the contents of the RichTextEditor control to the OS clipboard."
click="button_click();" />
</mx:ApplicationControlBar>
<mx:RichTextEditor id="richTextEditor"
text="The quick brown fox jumped over the lazy dog."
width="100%"
height="100%" />
</mx:Application>
来自:http://blog.flexexamples.com/2008/01/30/copying-text-to-the-operating-system-clipboard-in-flex/
利用事件拷贝,
<!-- http://blog.flexexamples.com/2008/01/30/copying-text-to-the-operating-system-clipboard-in-flex/ -->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
layout="vertical"
verticalAlign="middle"
backgroundColor="white">
<mx:Script>
<![CDATA[
import mx.controls.Alert;
private function button_click():void {
System.setClipboard(richTextEditor.text);
Alert.show("Done");
}
]]>
</mx:Script>
<mx:ApplicationControlBar dock="true">
<mx:Button id="button"
label="Copy text to clipboard"
toolTip="Click here to copy the contents of the RichTextEditor control to the OS clipboard."
click="button_click();" />
</mx:ApplicationControlBar>
<mx:RichTextEditor id="richTextEditor"
text="The quick brown fox jumped over the lazy dog."
width="100%"
height="100%" />
</mx:Application>
来自:http://blog.flexexamples.com/2008/01/30/copying-text-to-the-operating-system-clipboard-in-flex/
利用事件拷贝,
相关文章推荐
- DataGridView选择的内容拷贝至剪贴板代码
- java IO流之文本内容的行逆序拷贝
- C#从windows剪贴板获取并显示文本内容的方法
- 利用JavaScript实现拷贝内容到剪贴板
- Android 复制文本内容到系统剪贴板的最简单实例(分享)
- 文件内容拷贝(1)文本方式-逐个字符拷贝(2)文本方式--逐行拷贝(3)二进制方式--逐块拷贝 (4)二进制方式-一次性拷贝
- Android 复制文本内容到系统剪贴板的最简单实践
- 文件内容拷贝(1)文本方式-逐个字符拷贝(2)文本方式--逐行拷贝(3)二进制方式--逐块拷贝 (4)二进制方式-一次性拷贝
- Android 复制文本内容到系统剪贴板的最简单实践
- flex按钮控制文本标签内容
- CListBox多选并把多选的内容拷贝到剪贴板
- 拷贝文本到Windows剪贴板
- vc获取剪贴板文本内容
- UITextView粘贴剪贴板上的内容导致文本显示不全
- Flex中利用TextRange类高亮(hightlight)显示文本内容的例子
- Android 复制文本内容到系统剪贴板
- Android 复制文本内容到系统剪贴板的最简单实践
- PJ-Blog教程┊增强博客用户体验~让发表内容的同时拷贝到剪贴板以防丢失
- android开发 -- 复制文本内容到系统剪贴板(自由复制)
- PJ-Blog教程┊增强博客用户体验~让发表内容的同时拷贝到剪贴板以防丢失