Skip to main content
Participating Frequently
June 12, 2009
Question

RichEditableText.multiline doesn't work

  • June 12, 2009
  • 1 reply
  • 975 views

Setting the multiline property of RichEditableText to false doesn't seem to work in the latest build.

A work around is to set the heightInLines to 0 but the RET still allows the single line field to scroll.

Is there another property I should be setting?

This topic has been closed for replies.

1 reply

Peter_deHaan
Participating Frequently
June 12, 2009

Nick,

I'll trade you test cases...

Here's my case from Flex SDK 4.0.0.7751. With multiline==true (default), the enter key adds a new line. With multiline==false, the enter key dispatches the enter event.

<?xml version="1.0" encoding="utf-8"?>
<s:Application  xmlns:fx="http://ns.adobe.com/mxml/2009"
  xmlns:s="library://ns.adobe.com/flex/spark" 
  xmlns:mx="library://ns.adobe.com/flex/halo">
<fx:Script>
  <![CDATA[
   import mx.controls.Alert;
   import mx.events.FlexEvent;

   protected function ret_enterHandler(evt:FlexEvent):void {
    Alert.show(evt.type);
   }
  ]]>
</fx:Script>

<s:VGroup>
  <s:CheckBox id="checkBox"
    label="multiline"
    change="ret.multiline = checkBox.selected;" />
  <s:RichEditableText id="ret"
    text="The quick brown fox jumps over the lazy dog"
    width="200"
    initialize="checkBox.selected = ret.multiline;"
    enter="ret_enterHandler(event);" />
  <mx:HRule width="100%" />
  <s:SimpleText text="Flex SDK 4.0.0.7751" />
</s:VGroup>

</s:Application>

Also, for Flex SDK specific issues like RichEditableText, it may be better to post on the Flex SDK/Flash Builder forums at http://forums.adobe.com/community/labs/gumbo.

Peter