Skip to main content
Inspiring
December 21, 2009
Question

TLFTextField, selectable property not working?

  • December 21, 2009
  • 1 reply
  • 4114 views

I understand that "TLFTextField" class is currently under construction but anywhere I googled, I found some talks about the language direction thing which is not yet implemented... but I wonder if other properties are also not working? like .selectable?

this is my code and the TLFTextField won't be selected and I can't make it into type INPUT!

var textFormat:TextFormat = new TextFormat();
textFormat.font = "Arial"  

textFormat.size = 15;
textFormat.color = 0x000000;
//_textFormat.direction = "ltr";

  
   var theText:TLFTextField = new TLFTextField();
   theText.autoSize = TextFieldAutoSize.LEFT;
   theText.antiAliasType = AntiAliasType.ADVANCED;
   theText.embedFonts = true;
   theText.selectable = true;
   theText.type = TextFieldType.INPUT;
   theText.defaultTextFormat = textFormat;
   theText.tabIndex = this._index;
   theText.text = "some text";

  
   this.addChild(theText);

This topic has been closed for replies.

1 reply

Participating Frequently
December 22, 2009

TLF itself no longer includes anything called TLFTextField.

Flex 4 has an FTETextField which implements a subset of TextField functionality -- no scrolling, selection, editing, or hyperlinks.

Flash Pro CS5 has a TLFTextField which implements most of TextField functionality, including 'selectable'.

Gordon Smith

Adobe Flex SDK Team

emstrisAuthor
Inspiring
December 23, 2009

Thanks for the reply. so do you mean that we have to wait till CS5 is launched?

What are my other choices if I want to use all those features that the old fashioned TextField class did? as you said and I also tried, FTETextField in flex SDK also doesn't support editing and selecting right now and we also don't have those features for the textFlow class. so what would you suggest if I want to have those features (MaxChars, showAsPassword, etc) with my RTL script? you know, the biggest issue is that when I got to know the TLF project, I told my client and they are expecting this, so I must find away which now I am disappointed and I'm hoping if there's an alternative here?

Thanks,

Hadi

Participating Frequently
December 23, 2009

> do you mean that we have to wait till CS5 is launched?

If you want the TLFTextField in Flash Pro CS5, you either have to get a beta of it or wait until it ships.

> editing and selecting ... we ... don't have those features for the textFlow class

Yes, you do. If you are using TLF by itself, just give the TextFlow an interactionManager that is either a SelectionManager or an EditManager.

And if you are using TLF inside of Flex 4 components, they support selection and editing, including in bidirectional text, because they take care of, for example, setting the interactionManager when you set the 'selectable' or 'editable' properties.

> maxChars, displayAsPassword

These aren't implemented by TLF, but TLF makes it possible for the Flex 4 components to implement them. If you want to use TLF outside of our components, take a look at how we implemented maxChars and displayAsPassword in, say, the Spark TextInput.

Gordon Smith

Adobe Flex SDK Team