Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Set width and height of node warp_content - Text size automatically change - Text color (Read 2248 times)
Ngo Duc Quang
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 14
Location: Ha Noi
Joined: Jun 10th, 2019
Set width and height of node warp_content - Text size automatically change - Text color
Jun 11th, 2019 at 1:44am
Print Post  
- 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 2:55am by Ngo Duc Quang »  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3152
Joined: Oct 19th, 2005
Re: Set width and height of node warp_content - Text size automatically change - Text color
Reply #1 - Jun 11th, 2019 at 6:55am
Print Post  
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
  
Back to top
 
IP Logged
 
Ngo Duc Quang
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 14
Location: Ha Noi
Joined: Jun 10th, 2019
Re: Set width and height of node warp_content - Text size automatically change - Text color
Reply #2 - Jun 11th, 2019 at 8:45am
Print Post  
Thank you  Grin This information is very good  Grin
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint