Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic SetWrapAtCharacter text spilling out sometimes (Read 4353 times)
koosala
Full Member
***
Offline


Java Happens

Posts: 136
Joined: May 13th, 2007
SetWrapAtCharacter text spilling out sometimes
Oct 15th, 2007 at 8:42am
Print Post  
Hi,

I have this piece of code:

Code
Select All
private FlowChart flowChart;

private void testTextWrap() {
flowChart = new FlowChart();

TextFormat test = new TextFormat(Align.Center, Align.Center);
test.setWrapAtCharacter(true);
flowChart.setTextFormat(test);
flowChart.setAllowInplaceEdit(true);
this.getContentPane().add(flowChart);
}
 



I create a box on the canvas.
Double click to start in-place edit.
Type one character.
Type lot of white spaces so that the cursor goes out of scope in the text area.
Then type some more characters.

Click on the canvas to set the text for the box. I observed that the text spills to the left side of the box, even though I mentioned that the text must wrap at character.

Thanks,
Praveen
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: SetWrapAtCharacter text spilling out sometimes
Reply #1 - Oct 16th, 2007 at 11:57am
Print Post  
Hi,

It seems too many spaces confuse the text layout function. We'll try to fix this in the next release. To work around this, remove repeating spaces from the text entered by the user in response to the BoxTextEdited event.

Stoyan
  
Back to top
 
IP Logged
 
koosala
Full Member
***
Offline


Java Happens

Posts: 136
Joined: May 13th, 2007
Re: SetWrapAtCharacter text spilling out sometimes
Reply #2 - Jan 28th, 2008 at 2:03am
Print Post  
Hi Stoyan,

Does the release 1.0.2 have this fix?

Thanks,
Praveen
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: SetWrapAtCharacter text spilling out sometimes
Reply #3 - Jan 28th, 2008 at 6:03am
Print Post  
Hi Praveen,

We haven't fixed that yet.

Stoyan
  
Back to top
 
IP Logged
 
koosala
Full Member
***
Offline


Java Happens

Posts: 136
Joined: May 13th, 2007
Re: SetWrapAtCharacter text spilling out sometimes
Reply #4 - Jan 28th, 2008 at 6:07am
Print Post  
Hi Stoyan,

Do you think this would be possible anytime soon, or is there something I can do to get around this?

Thanks,
Praveen
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: SetWrapAtCharacter text spilling out sometimes
Reply #5 - Jan 28th, 2008 at 11:53am
Print Post  
Hi Praveen,

Our developer will try to fix this later this week. For now you can replace repeating spaces with a single character.

Stoyan
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: SetWrapAtCharacter text spilling out sometimes
Reply #6 - Jan 31st, 2008 at 6:35am
Print Post  
I have sent you a PM with an updated TextLayout.java. Let me know if you still have any problems.

Stoyan
  
Back to top
 
IP Logged
 
koosala
Full Member
***
Offline


Java Happens

Posts: 136
Joined: May 13th, 2007
Re: SetWrapAtCharacter text spilling out sometimes
Reply #7 - Jan 31st, 2008 at 7:11am
Print Post  
Works fine. Thank you!

Praveen
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint