Space between lines
Space between lines
Hello,
How to increase the space (vertical) between lines of a Text component with word wrap ?
How to increase the space (vertical) between lines of a Text component with word wrap ?
Re: Space between lines
Hello.
Unfortunately, it's impossible to change space between lines Text components in Reports.Fx for Flex.
Thank you.
Unfortunately, it's impossible to change space between lines Text components in Reports.Fx for Flex.
Thank you.
Re: Space between lines
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>
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
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.
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
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.
<?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
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.
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
OK,
Glad I could help to improve.
Glad I could help to improve.
Re: Space between lines
Hello.
Let us know if you have any questions else.
Thank you.
Let us know if you have any questions else.
Thank you.