Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Text Wrapping in not working properly (Read 3849 times)
Anshul
Senior Member
****
Offline


I love YaBB 1G - SP1!

Posts: 316
Joined: Apr 3rd, 2009
Text Wrapping in not working properly
Feb 18th, 2011 at 11:07am
Print Post  
Hi Stoyan,

For ShapeNode's text in our application we want following behavior.
1. Text should come within its text area.
2. If text is larger and continuous (don't have spaces in between the words) than text should wrapped to the second line.
3. If text is larger enough and still not coming in two lines than it should not go to the third line, instead it should trimmed.

Let know how we can achieve TextWrapping.None with TextWrapping.CharacterEllipse?

Regards,
Anshul
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Text Wrapping in not working properly
Reply #1 - Feb 21st, 2011 at 7:06am
Print Post  
Hi,

This wraps continuous text and trims the last line:

shape.Text = "test123412341234";
shape.TextWrapping = TextWrapping.Wrap;
shape.PolygonalTextLayout = true;

If you don't want to see a third line of text, you must set node.Bounds to a height that fits just two lines.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Anshul
Senior Member
****
Offline


I love YaBB 1G - SP1!

Posts: 316
Joined: Apr 3rd, 2009
Re: Text Wrapping in not working properly
Reply #2 - Feb 21st, 2011 at 8:59am
Print Post  
Hi Stoyan,

It has partially resolved the issue, if text is not properly fitting in two lines than text should get trimmed.

Text area height is not allowing text in third line but i want text trimmed in second line if it is larger for two lines.

How text trimming can be achieved along with the previous solution?

Regards,
Anshul
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Text Wrapping in not working properly
Reply #3 - Feb 21st, 2011 at 12:37pm
Print Post  
What's wrong with trimming in the previous solution? Does your text stick out of the node?
  
Back to top
 
IP Logged
 
Anshul
Senior Member
****
Offline


I love YaBB 1G - SP1!

Posts: 316
Joined: Apr 3rd, 2009
Re: Text Wrapping in not working properly
Reply #4 - Feb 21st, 2011 at 12:49pm
Print Post  
Not out of the node instead it is clipping from the node border.

I want text should not clip, it should trimmed so that user can easily identify that there are some more text.

Regards,
Anshul
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Text Wrapping in not working properly
Reply #5 - Feb 21st, 2011 at 1:11pm
Print Post  
If by trimming you mean displaying ellipsis, use these settings:

shape.Text = "test123412341234";
shape.TextWrapping = TextWrapping.Wrap;
shape.PolygonalTextLayout = true;
shape.TextTrimming = TextTrimming.CharacterEllipsis;
shape.EnableStyledText = true;

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint