- Welcome, Guest. Please Login or Register
MindFusion  
  We are soon releasing MindFusion.JavaScript pack. Initial version includes chart, diagram, calendar, map, virtual keyboard, gauge and UI components. Here are the beta version and live demo for anyone interested.  
  HomeHelpSearchLoginRegister   
     
     
   
 
Page Index Toggle Pages: 1 Send Topic Print  
Set width and height of node warp_content - Text size automatically change - Text color
Read 55 times

Ngo Duc Quang   Offline
YaBB Newbies
*
Posts: 6
Gender: male
Ha Noi
I Love MindFusion!


   
     
 
Set width and height of node warp_content - Text size automatically change - Text color
Jun 11th, 2019 at 2:44am
 
- I want to set height and width of node warp_content.
Example: text in the node is long or short, nodes must also have the same width and height.
- Text size automatically change when the nodes resize?
- How to set text color in node and link?

Thanks for helps  Cry Cry
 
 
« Last Edit: Jun 11th, 2019 at 3:55am by Ngo Duc Quang »
 
IP Logged    
 
     

Slavcho   Offline
God Member
*****
Posts: 1700
Gender: male
tech.support


   
     
 
Re: Set width and height of node warp_content - Text size automatically change - Text color
Reply #1 - Jun 11th, 2019 at 7:55am
 
Quote:
- I want to set height and width of node warp_content.
Example: text in the node is long or short, nodes must also have the same width and height.


You can set your fixed node size by calling node.setBounds(RectF). Text in ShapeNodes should automatically wrap to new lines if it doesn't fit on one. If you want to resize nodes to fit their text tightly, call the resizeToFitText method.

Quote:
- Text size automatically change when the nodes resize?


It's not supported out of the box, you might try changing font size from nodeModified event handler depending on how much the node has been resized.

Quote:
- How to set text color in node and link?


Call DiagramItem.setTextBrush(...) method.

Regards,
Slavcho
 
 
 
IP Logged    
 
     

Ngo Duc Quang   Offline
YaBB Newbies
*
Posts: 6
Gender: male
Ha Noi
I Love MindFusion!


   
     
 
Re: Set width and height of node warp_content - Text size automatically change - Text color
Reply #2 - Jun 11th, 2019 at 9:45am
 
Thank you  Grin This information is very good  Grin
 
 
 
IP Logged    
 
     
Page Index Toggle Pages: 1 Send Topic Print