Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic fix text bounds (Read 2963 times)
superNova
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 23
Joined: Aug 5th, 2011
fix text bounds
Aug 5th, 2011 at 6:08am
Print Post  
when we add text onto shapnode its come in center by default is there anyway to fix this text at particular place on shapnode.
  
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: fix text bounds
Reply #1 - Aug 5th, 2011 at 6:59am
Print Post  
You have to apply a TextFormat object with the appropriate values to the node via the setTextFormat method.

Regards,
Meppy
  
Back to top
 
IP Logged
 
superNova
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 23
Joined: Aug 5th, 2011
Re: fix text bounds
Reply #2 - Aug 6th, 2011 at 5:09am
Print Post  
its not accepting int value. pls provide suitable example like shapnode1.settextformat (  ??)

what parameter i should pass here.
  
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: fix text bounds
Reply #3 - Aug 7th, 2011 at 7:36am
Print Post  
The following code applies a bottom-left text alignment to the ShapeNode referenced by the variable node:

Code
Select All
node.getTextFormat().setHorizontalAlign(Align.Near);
node.getTextFormat().setVerticalAlign(Align.Far); 


Alternatively, you can create a new TextFormat object, set its values and assign it to the node through the setTextFormat method.

Regards,
Meppy
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint