Flex中如何控制鼠标移出RichTextEditor编辑范围外的时候隐藏其工具栏的例子
By Minidxer | January 21, 2009
接下来的例子演示了Flex中如何控制鼠标移出RichTextEditor编辑范围外的时候隐藏其工具栏。
让我们先来看一下Demo(可以右键View Source或点击这里察看源代码):
下面是完整代码(或点击这里察看):
Download: main.mxml
- <?xml version="1.0" encoding="utf-8"?>
- <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
- layout="vertical"
- verticalAlign="middle"
- backgroundColor="white">
- <mx:RichTextEditor id="richTextEditor"
- title="RichTextEditor"
- status="version {richTextEditor.getStyle('version')}"
- showControlBar="false"
- cornerRadius="0"
- width="100%"
- height="100%"
- rollOut="richTextEditor.showControlBar = false;"
- rollOver="richTextEditor.showControlBar = true;" />
- <mx:Label text="Roll over the RichTextEditor control above to toggle the control bar." />
- </mx:Application>
代码:Peter deHaan 翻译/整理/编译:中文Flex例子
Topics:
RichTextEditor |
1 Comment » |
Tags: RichTextEditor, rollOut, rollOver, showControlBar
有bug 你试试打上文字,然后更改字体大小,你会发现你鼠标移动到字体大小的选项的时候就隐藏了工具栏了。