It seems that I’ve covered this before, “Toggling the control bar in a Flex RichTextEditor control”, but here is another useful way to toggle the control bar in a Flex RichTextEditor control. The following example shows how you can toggle the RichTextEditor control’s control bar by moving the mouse cursor over or out of the RichTextEditor instance.

Full code after the jump.

View MXML

<?xml version="1.0" encoding="utf-8"?>
<!-- http://blog.flexexamples.com/2007/12/31/toggling-the-control-bar-in-a-flex-richtexteditor-control-redux/ -->
<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>

View source is enabled in the following example.

 
Tagged with:
 
About The Author

Peter deHaan

Peter deHaan currently works for Adobe on the Flex SDK QA team. While not working on Flex, Flash, and ColdFusion applications, Peter enjoys making up bios and writing in 3rd person. Peter's rarely updated blog can be found at blogs.adobe.com/pdehaan/, actionscriptexamples.com, airexamples.com, and coldfusionexamples.com.

3 Responses to Toggling the control bar in a Flex RichTextEditor control (redux)

  1. Mark Fuqua says:

    Very responsive and quiet cool. I can not wait until I can do this kind of stuff. However, when I go to change the font size via the select control, it goes away.

  2. peterd says:

    Mark Fuqua,

    Ha, good point. I never noticed that. It seems that when you move your mouse over the ComboBox control’s dropdown menu it is dispatching a rollOut event for the RichTextEditor control. It seems to work if you use your mouse to select a font name or font size though.

    Peter

  3. cool says:

    humm, seems doesn’t and it goes away whatever you select Font Name or Font Size

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="">

Anti-Spam Protection by WP-SpamFree