Page 1 of 1

Space between lines

Posted: Tue Nov 25, 2014 11:53 pm
by hugo
Hello,

How to increase the space (vertical) between lines of a Text component with word wrap ?

Re: Space between lines

Posted: Wed Nov 26, 2014 6:17 am
by HighAley
Hello.

Unfortunately, it's impossible to change space between lines Text components in Reports.Fx for Flex.

Thank you.

Re: Space between lines

Posted: Wed Nov 26, 2014 8:51 am
by hugo
Hello,

Thank you.

This is possible in Flex (at least with spark but since you use Flex 4 should not be a problem for you).
Example:

<?xml version="1.0" encoding="utf-8"?>
<s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx">
<s:RichText id="richTxt"
horizontalCenter="0" verticalCenter="0">
<s:textFlow>
<s:TextFlow>
<s:p lineHeight="60">The quick brown<s:br/><s:span fontWeight="bold">fox jumps over</s:span> the lazy dogg.</s:p>
</s:TextFlow>
</s:textFlow>
</s:RichText>
</s:WindowedApplication>

Re: Space between lines

Posted: Wed Nov 26, 2014 12:13 pm
by Vladimir
Hello,

In your example you use Spark controls. Currently to draw text using the flash.text.TextField control. If you have sample code for the TextField, we will try to implement it in our application.

Thank you.

Re: Space between lines

Posted: Thu Nov 27, 2014 7:17 pm
by hugo
With TextField you can do this:

<?xml version="1.0" encoding="utf-8"?>
<s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"
creationComplete="init()">

<fx:Script>
<![CDATA[
private function init():void
{
var myText:TextField = new TextField();
myText.width = 100;
myText.height = 100;
myText.multiline = true;
myText.wordWrap = true;
myText.htmlText = "<textformat leading='10'>The quick brown fox jumps over the lazy dogg</textformat>"
visual.addChild(myText);
}
]]>
</fx:Script>

<s:SpriteVisualElement id="visual"/>
</s:WindowedApplication>

Now, that I know that is a TextField, I can activate the property "Allow HMTL tags" and use leading as a workaround.

Re: Space between lines

Posted: Mon Dec 01, 2014 1:24 pm
by Vladimir
Hello,

You can use any HTML tags that are supported TextField.
Thanks for the code, we will add it to our knowledge base.

Thank you.

Re: Space between lines

Posted: Mon Dec 01, 2014 5:17 pm
by hugo
OK,

Glad I could help to improve.

Re: Space between lines

Posted: Tue Dec 02, 2014 10:02 am
by HighAley
Hello.

Let us know if you have any questions else.

Thank you.