Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic node font (Read 1550 times)
hadni
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 10
Joined: Jan 18th, 2011
node font
Mar 11th, 2011 at 4:36am
Print Post  
helo, i have a question here.
I want to make the font size in the node change if the node resized.. so if i resize the node into a bigger size, the font size will get bigger too..
how can i do that? is anyone know?
thank's a bunch..
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: node font
Reply #1 - Mar 11th, 2011 at 7:42am
Print Post  
Hi,

If you need to display only a single line of text, you could do this:

Code
Select All
private void diagram_NodeModifying(object sender, NodeValidationEventArgs e)
{
	e.Node.Font = new Font(e.Node.Font.FontFamily,
		e.Node.Bounds.Height * 2 / 3, GraphicsUnit.Millimeter);
} 



Or otherwise you could scale the text proportionally to the change in height of the node. You will have to keep the original node size in that case.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
hadni
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 10
Joined: Jan 18th, 2011
Re: node font
Reply #2 - Mar 11th, 2011 at 9:19am
Print Post  
thank you so much Grin Grin Grin Grin Grin
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint