I'm using Flex builder 3.5 and have added TLF textflows to our application to support inline graphics. I've added a textflow as a child to an MX:canvas for the input field but I can't get it to have focus until it is clicked on. The setfocus call works when the textflow had focus and I return focus to it after other control windows have been used to adjust the font style but not when the application starts. Below is the creation complete from the MXML component containing the canvas.
protected function creationComplete():void
// Attach input text flow to canvas
var sprite:Sprite = new Sprite();
textFlow.flowComposer = new StandardFlowComposer();
textFlow.flowComposer.addController(new ContainerController(sprite, tiCanvas.width, tiCanvas.height));
// Create edit manager and connect to flow
editMan = new EditManager();
textFlow.interactionManager = editMan;
// Set inital text properties
textFlow.fontSize = 14;
textFlow.fontFamily = "Arial";
// Activate input flow
Any ideas why this doesn't work?
Why not use RichEditableText? You will need to borrow lots of code from it
to get things to work properly.
We are only using Flex Builder 3 and Flex 3.5 SDK. Does this not work properly with TLF? I have just about finished updating our application with TLF and don't have much more Flex work planned.
Is RichEditableText only in Flex 4?
RichEditableText is only in Flex 4, but you could copy the source and start
from there. It doesn't have too many Flex 4 dependencies, I don't think.