Space between lines

Stimulsoft Reports.Flex discussion
Locked
hugo
Posts: 359
Joined: Fri Mar 08, 2013 10:46 am

Space between lines

Post by hugo »

Hello,

How to increase the space (vertical) between lines of a Text component with word wrap ?
HighAley
Posts: 8431
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Space between lines

Post by HighAley »

Hello.

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

Thank you.
hugo
Posts: 359
Joined: Fri Mar 08, 2013 10:46 am

Re: Space between lines

Post 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>
Vladimir
Posts: 1462
Joined: Fri Apr 13, 2007 4:05 am
Location: Earth

Re: Space between lines

Post 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.
hugo
Posts: 359
Joined: Fri Mar 08, 2013 10:46 am

Re: Space between lines

Post 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.
Vladimir
Posts: 1462
Joined: Fri Apr 13, 2007 4:05 am
Location: Earth

Re: Space between lines

Post 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.
hugo
Posts: 359
Joined: Fri Mar 08, 2013 10:46 am

Re: Space between lines

Post by hugo »

OK,

Glad I could help to improve.
HighAley
Posts: 8431
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Space between lines

Post by HighAley »

Hello.

Let us know if you have any questions else.

Thank you.
Locked