I'm trying to use the trick where you remove the toolbar from a RichTextEditor and add it elsewhere. Ideally I'd like to have a single static toolbar that interacts with the TextArea that has focus, but I haven't figured out how to do that yet.
Anyway, below is the code I use to add the RichTextArea to the selected child in a ViewStack, then I try to add the toolbar child of that RTE to another HBox container textControls. Note that this HBox container is NOT inside the slideViewStack. //Add text private function addText():void { var rte:RichTextEditor = new RichTextEditor(); var tc:TextControl = new TextControl(); rte.id = "rte"; rte.styleName = "rtePanel"; rte.addEventListener(FocusEvent.FOCUS_IN, enableToolbar); rte.addEventListener(FocusEvent.FOCUS_OUT, disableToolbar); slideViewStack.selectedChild.addChild(rte); rte.showControlBar=false; textControls.addChild(DisplayObject(rte.toolbar)); //causes problem } When the toolbar is added to the HBox, I get the following error trace: ReferenceError: Error #1069: Property fontFamilyCombo not found on main and there is no default value. at mx.core::Container/hasChildMatchingDescriptor() [E:\dev\3.0.x\frameworks\projects\framework\src\mx\core\Container.as:3 704] at mx.core::Container/createComponentFromDescriptor() [E:\dev\3.0.x\frameworks\projects\framework\src\mx\core\Container.as:3 561] at mx.core::Container/createComponentsFromDescriptors() [E:\dev\3.0.x\frameworks\projects\framework\src\mx\core\Container.as:3 485] at mx.core::Container/createChildren() [E:\dev\3.0.x\frameworks\projects\framework\src\mx\core\Container.as:2 587] at mx.core::UIComponent/initialize() [E:\dev\3.0.x\frameworks\projects\framework\src\mx\core\UIComponent.as :5262] at mx.core::Container/initialize() [E:\dev\3.0.x\frameworks\projects\framework\src\mx\core\Container.as:2 524] at mx.core::UIComponent/http://www.adobe.com/2006/flex/mx/internal::child Added() [E:\dev\3.0.x\frameworks\projects\framework\src\mx\core\UIComponent.as :5159] at mx.core::Container/http://www.adobe.com/2006/flex/mx/internal::childAd ded() [E:\dev\3.0.x\frameworks\projects\framework\src\mx\core\Container.as:3 297] at mx.core::Container/addChildAt() [E:\dev\3.0.x\frameworks\projects\framework\src\mx\core\Container.as:2 210] at mx.core::Container/addChild() [E:\dev\3.0.x\frameworks\projects\framework\src\mx\core\Container.as:2 140] at main/addText()[C:\Users\Administrator\Documents\Flex Builder 3\Content_demo\src\main.mxml:398] at main/__addTextBtn_click() [C:\Users\Administrator\Documents\Flex Builder 3 \Content_demo\src\main.mxml:504] Any thoughts? After closing the error, it generally seems to work as I'd hoped.