Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Text Wrap in TableNode (Read 2680 times)
Puneet Jain
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 9
Joined: Mar 18th, 2013
Text Wrap in TableNode
Apr 22nd, 2013 at 9:51pm
Print Post  
Hi,

I am unable to set the text wrap property on the tablecell. I am using the following code :

function onNodeCreated(sender, args)
{
var scriptHelper = <%= diagramView.AppletElement %>.getScriptHelper();

var node = args.getNode();
if(node.getShape().getId() == "TableCell")
{
var t = sender.getFactory().createTableNode(node.getBounds());
t.setCaption("");
t.setConnectionStyle(3);
t.redimTable(1, 4);
t.getCell(0, 0).setRowSpan(4);
t.setOffsetHeaderRows(true);
t.getRows().get(0).setHeight(t.getBounds().getHeight() - t.getCaptionHeight());
t.getRows().get(0).setHeader(false);
t.getCell(0, 0).setText("");
t.getCell(0, 0).getTextFormat().setWrapAtCharacter(true);
t.getCell(0, 0).getTextFormat().setNoWrap(false);
sender.getNodes().remove(node);
}
}


Please see the attachment. I am trying to add the following piece of text "Lorem Ipsum is simply dummy text of the printing and typesetting industry"

Please suggest.
  

Wrap.jpg (Attachment deleted)
Back to top
 
IP Logged
 
Forum Admin
YaBB Administrator
*****
Offline


Rock and Roll

Posts: 694
Joined: Apr 6th, 2003
Re: Text Wrap in TableNode
Reply #1 - Apr 23rd, 2013 at 6:41am
Print Post  
This Topic was moved here from Windows Forms [move by] Forum Admin.
  
Back to top
WWW  
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Text Wrap in TableNode
Reply #2 - Apr 23rd, 2013 at 6:57am
Print Post  
Hi,

At this time text will wrap inside table cells only if the EnableStyledText property is set:

t.setEnableStyledText(true);

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