Welcome!

Welcome to the Official BlackBerry Support Community Forums. This is your resource to discuss support topics with your peers, and learn from each other. New to the forum? Please visit the ‘Getting Started’ link below.
inside custom component

Adobe AIR Development

Reply
New Developer
bdeneau
Posts: 34
Registered: ‎03-23-2011
My Carrier: Rogers

TextArea in an AS project

I can't figure out how to make an editable textarea in an AS project.  Just as a test I want litterally a full screen text box that you can type text in to but it's not showing up.  From the searching I did it looks like it might not be possible.  Could that really be true? Something so simple omitted from the release?

 

Here's what I've tried so far:

 

 

package
{
	import flash.display.Sprite;
	
	import spark.components.TextArea;
	
	[SWF(width="1024", height="600", backgroundColor="#cccccc", frameRate="30")]
	public class PHPIDE extends Sprite
	{
		public function PHPIDE()
		{
			var txtArea:TextArea = new TextArea(); 
			
			txtArea.height = 600;
			txtArea.width = 1024;
			txtArea.x = 0;
			txtArea.y = 0;
			
			addChild(txtArea);
		}
	}
}

 

I really just want to create something similar to Notepad, maybe with some rich text, but nothing shows up when I run this code.

 

Please use plain text.
Developer
jtegen
Posts: 6,145
Registered: ‎10-27-2010
My Carrier: AT&T

Re: TextArea in an AS project

Not certain if anyone got spark or mx TextArea to work. There is a simple text area control in the community library you can try, but it may not have all the bells you might be looking for.
Please use plain text.
Contributor
jimmyd25
Posts: 43
Registered: ‎11-17-2010

Re: TextArea in an AS project

[ Edited ]

I'm using mx TextArea throughout my app and it is working fine.

 

<mx:TextArea
            id="Area1"
            x="40" y="95"
            width="564"  height="93"
            editable="true" selectable="true"
            color="#4a4a4b" contentBackgroundColor="#e7e7e7"
            borderColor="#aeaeae"
            borderStyle="solid"
            fontSize="14"
            fontFamily="Verdana"
            borderSkin="mx.skins.halo.HaloBorder"
            />

 

Your code looks right though, I'm not sure why it is not working for you.

 

Do you have any other components on the page that might be on top of the text area and covering it?

Please use plain text.
New Developer
bdeneau
Posts: 34
Registered: ‎03-23-2011
My Carrier: Rogers

Re: TextArea in an AS project

You're using a flex project, mine is pure AS.  And the sample code is literally the whole app just to test it, and there's nothing else on the stage.

 

I think jtegen summed up what I already thought. Darn!

Please use plain text.