Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Extra space displayed in tablenode cell. (Read 1430 times)
vishalb
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 11
Joined: May 14th, 2020
Extra space displayed in tablenode cell.
Aug 25th, 2020 at 9:35am
Print Post  
Hi,

I am using
node.setEnableStyledText(true);
node.resizeToFitText(false, true);

resizeToFitText does wrapping of the text within cell but with this effect it show extra white space.

Can you please let me know how can we remove extra space.
Attaching screen shot for your reference.

Thanks.
  

cell_extra_space.png (Attachment deleted)
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Online


tech.support

Posts: 3378
Joined: Oct 19th, 2005
Re: Extra space displayed in tablenode cell.
Reply #1 - Aug 26th, 2020 at 9:33am
Print Post  
Hi,

It seems keep-width logic's not considering that last column always stretches to fill table, disregarding column's width value. Try either copying column's width from the table or the other way around before resizing:

Code
Select All
var t = diagram.factory.createTableNode(0, 0, 30, 30);
t.redimTable(1, 2);
t.getColumn(0).width = t.getBounds().width;
t.getCell(0, 1).setText("a".repeat(180) + "b");
t.setEnableStyledText(true);
t.resizeToFitText(false, true); 



Regards,
Slavcho
Mindfusion
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint