Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Display text under ShapeNode (Read 1830 times)
JB
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 8
Joined: Jan 20th, 2009
Display text under ShapeNode
Feb 18th, 2009 at 11:33am
Print Post  
Hi,
I was looking at your Network Sample -> Ready Diagram demo and was wondering how you get the text, such as Printer, Home, User, etc.,to display under the node (image)?

Many thanks,
JB
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Display text under ShapeNode
Reply #1 - Feb 18th, 2009 at 11:41am
Print Post  
Hi,

In that case the labels are separate nodes attached to the icon nodes through the DiagramNode.AttachTo() method. They are also Transparent and Locked.

Another possibility is to define a custom shape whose text region is below the outline, i.e. the text area Y coordinates are > 100.

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


I love YaBB 1G - SP1!

Posts: 8
Joined: Jan 20th, 2009
Re: Display text under ShapeNode
Reply #2 - Feb 19th, 2009 at 12:57pm
Print Post  
Hi Stoyan,
Thanks again for all your help, I truly appreciate it tremendously!!

My last question: How do I get the attached child node? E.g. If I make changes to my parent node the changes must also be reflected in the child node. I used childNode.AttachedTo(parentNode, AttachToNode.BottomLeft) to do the attaching.

Thanks,
Johan
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Display text under ShapeNode
Reply #3 - Feb 19th, 2009 at 1:07pm
Print Post  
Hi Johan,

Try with

if (someNode.SubordinateGroup != null)
{
     childNode = someNode.SubordinateGroup.AttachedNodes[0];
}

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