Skip to main content
Known Participant
July 30, 2008
Question

TextArea and TextInput text properties

  • July 30, 2008
  • 3 replies
  • 651 views
Hi,

how can I set text properties like direction, textAlign, fontSize etc. for TextArea and TextInput? The only way I found was to set these on their textView property, but I don't know if this is the right way. I tried it with setAttributes() but it's not working.

Setting properties through textView is also not working for TextInput. Is this a bug or it's not implemented yet?

If it must be done through textView, where's the right place to do it? In creationComplete() of the Application object I get null object exception.
** Update: ** I found the place, I did it in the creationComplete() event of the TextArea it self!

Bye,
Haykel
This topic has been closed for replies.

3 replies

Known Participant
July 30, 2008
Gordon said: If you can set them on a TextArea's TextView but not on a TextInput's TextView, that's a bug.

This was my fault! Actually it works, the problem is that the properties are not applied until the text is changed (which is a bug I think). In my tests I was updating the text for TextArea but not TextInput that's why I thought it only works for TextArea!

Anyway I followed the advice of Matt and I'm continuing this discussion on felxcoders. Here is the link: http://tech.groups.yahoo.com/group/flexcoders/message/120797

Haykel
Participating Frequently
July 30, 2008
Gumbo text components aren't yet supporting styles properly; that will<br />come later. Text attributes like fontSize are currently implemented as<br />properties on TextBox, TextGraphic, and TextView. If you can set them on<br />a TextArea's TextView but not on a TextInput's TextView, that's a bug.<br /><br />Gordon Smith<br />Adobe Flex SDK Team<br /><br /><br /><br />-----Original Message-----<br />From: Matt Chotin [mailto:member@adobeforums.com] <br />Sent: Wednesday, July 30, 2008 9:31 AM<br />To: flexsdk-dev@adobeforums.com<br />Subject: Re: TextArea and TextInput text properties<br /><br />A new message was posted by Matt Chotin in<br /><br />Developers --<br /> TextArea and TextInput text properties<br /><br />This question should probably be asked on flexcoders instead of here<br />since you're not developing the SDK itself.<br /><br />But I think you want to check out the styles available on those classes.<br /><br />matt<br /><br /><br />On 7/30/08 1:19 AM, "Haykel Ben Jemia" <member@adobeforums.com> wrote:<br /><br />A new discussion was started by Haykel Ben Jemia in<br /><br />Developers --<br /> TextArea and TextInput text properties<br /><br />Hi,<br /><br />how can I set text properties like direction, textAlign, fontSize etc.<br />for TextArea and TextInput? The only way I found was to set these on<br />their textView property, but I don't know if this is the right way. I<br />tried it with setAttributes() but it's not working.<br /><br />Setting properties through textView is also not working for TextInput.<br />Is this a bug or it's not implemented yet?<br /><br />If it must be done through textView, where's the right place to do it?<br />In creationComplete() of the Application object I get null object<br />exception.<br /><br />Bye,<br />Haykel<br /><br />________________________________<br />View/reply at TextArea and TextInput text properties<br /><a href=http://www.adobeforums.com/webx?13@@.59b5fa2d><br />Replies by email are OK.<br />Use the unsubscribe<br /><a href=http://www.adobeforums.com/webx?280@@.59b5fa2d!folder=.3c060fa3> form<br />to cancel your email subscription.<br /><br /><br /><br /><br />------------------------------------------------------<br />View/reply at <a href=http://www.adobeforums.com/webx?13@@.59b5fa2d/0><br />Replies by email are OK.<br />Use the unsubscribe form at<br /><a href=http://www.adobeforums.com/webx?280@@.59b5fa2d!folder=.3c060fa3> to<br />cancel your email subscription.
matt_chotin
Inspiring
July 30, 2008
This question should probably be asked on flexcoders instead of here since you're not developing the SDK itself.<br /><br />But I think you want to check out the styles available on those classes.<br /><br />matt<br /><br /><br />On 7/30/08 1:19 AM, "Haykel Ben Jemia" <member@adobeforums.com> wrote:<br /><br />A new discussion was started by Haykel Ben Jemia in<br /><br />Developers --<br /> TextArea and TextInput text properties<br /><br />Hi,<br /><br />how can I set text properties like direction, textAlign, fontSize etc. for TextArea and TextInput? The only way I found was to set these on their textView property, but I don't know if this is the right way. I tried it with setAttributes() but it's not working.<br /><br />Setting properties through textView is also not working for TextInput. Is this a bug or it's not implemented yet?<br /><br />If it must be done through textView, where's the right place to do it? In creationComplete() of the Application object I get null object exception.<br /><br />Bye,<br />Haykel<br /><br />________________________________<br />View/reply at TextArea and TextInput text properties <a href=http://www.adobeforums.com/webx?13@@.59b5fa2d><br />Replies by email are OK.<br />Use the unsubscribe <a href=http://www.adobeforums.com/webx?280@@.59b5fa2d!folder=.3c060fa3> form to cancel your email subscription.