Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Resize node size based on size of text (Read 1342 times)
newbieDraw
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 24
Joined: Dec 22nd, 2011
Resize node size based on size of text
Nov 21st, 2013 at 4:43pm
Print Post  
Stoyo,

I have a custom node in which I have marked out 25% area for an icon and 75% for text. Nodes are all of the same (fixed) size when they are created. Sometimes the text is too big for the allocated area. Is there a way to automatically resize the node if the text does not fit?
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Resize node size based on size of text
Reply #1 - Nov 21st, 2013 at 7:07pm
Print Post  
Call Diagram.CreateMeasureGraphics() from your text property setter and then use various Graphics.MeasureString() overloads to find the text size.

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