Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic TextArea (Read 1839 times)
marksolo
YaBB Newbies
*
Offline


Suffering suckertash.....
..

Posts: 18
Joined: Nov 26th, 2008
TextArea
Dec 5th, 2008 at 8:08pm
Print Post  
Sorry if this is an old question, but I dont know how to search old articles on this forum,

anyway, are there any examples on how to modify the textArea property so I can draw the text outside a shape?

  
Back to top
 
IP Logged
 
marksolo
YaBB Newbies
*
Offline


Suffering suckertash.....
..

Posts: 18
Joined: Nov 26th, 2008
Re: TextArea
Reply #1 - Dec 5th, 2008 at 10:31pm
Print Post  
Well, I can draw text outside the shape now
by doing something like this,



Shape shp = Shapes.Sort;


RoundRectangleTemplate template=new RoundRectangleTemplate(-500.0f,-100.0f,1100.0f,0.0f, 1.0f);



ElementTemplate[] templates = new ElementTemplate[1];


templates[0] = (ElementTemplate)template;


shp.TextArea = templates;


However, it seems the diagram does not refresh some of the text that are outside the nodes' bounding rectangle when you drag and move.

right now I have to call DiagramView.Refresh manually but I wonder if there is a better approach.


  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: TextArea
Reply #2 - Dec 7th, 2008 at 8:43am
Print Post  
The Shape constructor does set a 'textOutside' flag when it detects that the text region does not fit within the shape outline, while the Shape.TextArea setter fails to do that. So, you could create a new shape, based on Sort, like this:

Code
Select All
new Shape(
	Shapes.Sort.Outline,
	Shapes.Sort.Decorations,
	templates,
	Shapes.Sort.FillMode,
	"mySort");
 



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


Suffering suckertash.....
..

Posts: 18
Joined: Nov 26th, 2008
Re: TextArea
Reply #3 - Dec 8th, 2008 at 5:05pm
Print Post  
Yes, that worked perfectly so I dont have to manually refresh the screen any more.

Thanks! Smiley
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint