The MindFusion Forums
Flow Diagramming Components >> Android >> Set width and height of node warp_content - Text size automatically change - Text color
https://mindfusion.eu/Forum/YaBB.pl?num=1560217488

Message started by Ngo Duc Quang on Jun 11th, 2019 at 1:44am

Title: Set width and height of node warp_content - Text size automatically change - Text color
Post by Ngo Duc Quang on Jun 11th, 2019 at 1: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  :'( :'(

Title: Re: Set width and height of node warp_content - Text size automatically change - Text color
Post by Slavcho on Jun 11th, 2019 at 6: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

Title: Re: Set width and height of node warp_content - Text size automatically change - Text color
Post by Ngo Duc Quang on Jun 11th, 2019 at 8:45am
Thank you  ;D This information is very good  ;D

The MindFusion Forums » Powered by YaBB 2.6.11!
YaBB Forum Software © 2000-2024. All Rights Reserved.