Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Shapenode Label (Read 3021 times)
BidMaestro
Junior Member
**
Offline


to learn is to live

Posts: 74
Location: Australia
Joined: Apr 20th, 2008
Shapenode Label
Apr 20th, 2008 at 11:50am
Print Post  
As a VB.net newbie I have been experimenting with flowchart.net (which is great) and I am looking for a simple method of

adding a label below a shapenode("Actor") with the format "SURNAME, Firstname, Middleinitial" as one line (no wrapping).

I used the technique in the predefined shapes example by attaching a hidden node for the label below the shapenode, however longer labels caused problems. I added code using measurestring from one of the forum examples to redefine the label bounds again this caused problems and I believe I am making the task harder than it should be.

Any suggestions would be appreciated

regards BidMaestro :(
  
Back to top
WWW  
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Shapenode Label
Reply #1 - Apr 21st, 2008 at 8:42am
Print Post  
The control leaves 1mm margins around the text, so add them to the result returned by MeasureString. Additionally, have you set the NoWrap bit in labelNode.TextFormat.FormatFlags?

Stoyan
  
Back to top
 
IP Logged
 
BidMaestro
Junior Member
**
Offline


to learn is to live

Posts: 74
Location: Australia
Joined: Apr 20th, 2008
Re: Shapenode Label
Reply #2 - Apr 21st, 2008 at 9:02am
Print Post  
Stoyan

Thank you for the prompt reply; I will test your response in the next few days. It maybe a suggestion for future releases that you could include a simplified label box for shapenodes rather than programming additional nodes and attaching them to label the shape. Or provide some different shapes with text areas outside the shape rather than embedded within the shape.

Once again, thank you for the great software.
  
Back to top
WWW  
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Shapenode Label
Reply #3 - Apr 21st, 2008 at 9:08am
Print Post  
Actually you can set the shapes' TextArea elements to be outside of the 0-100 range. Unfortunately, the ShapeDesigner does not support that yet, but you could do so from the Load event or constructor of your form:

Shapes.Actor.TextArea = new ElementTemplate[] { add LineTemplates with Y > 100 here }

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
BidMaestro
Junior Member
**
Offline


to learn is to live

Posts: 74
Location: Australia
Joined: Apr 20th, 2008
Re: Shapenode Label
Reply #4 - Apr 21st, 2008 at 10:18am
Print Post  
Stoyan

Again, thank you for the response...this is where this newbie is going to get into trouble and will stick to simpler methods. I will try your first response and hopefully see some new developments in the shapenode label area in the future.

Thank you from the other side of the planet... Australia
  
Back to top
WWW  
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint